I have been able to reproduce the issue on 22.5.1 consistently using the following steps:
1. Create a new RGB transparent document.
2. On top of the default layer add a group with a single layer inside and two more layers above the group.
3. Apply color overlay effect to the group and the layer above the group.
4. Select all layers and groups in the layer panel.
5. Right click the selected layers in the layer panel in any spot that is not directly over the group made earlier or click the Layer menu, choose Rasterize and then Layer Style.
6. A popup window will be displayed proclaiming "Could not rasterize because of a program error"
The intended behaviour is a bit tricky, I would say for me collapsing the group and applying the effect is the preferred result but this could be an unwanted behaviour for someone else, perhaps a better warning telling the user that he cannot rasterize a group this way.