I am not sure this will be completely helpful to you, but why would you cull shadows with ray tracing? Due to the way ray tracing works, you won’t gain much performance by culling shadows. In fact it is often case that various ray switch fakes actually decrease performance of the ray tracing. The main strong point of ray traced shadows is that even at infinite shadowing distance and very dense geometry, performance stays roughly the same as rays are cast from the camera in screen space, unlike shadow maps that are projected from lights in light space, requiring more resources as geometric density and shadow draw distance increases.
As the geometric complexity and required shadow casting distance increases, the ray traced shadows vs shadowmap performance gap closes up to a certain tipping point after which ray traced shadows are both higher quality as well as **faster **than the shadowmaps. Epic guys were explaining it in some talk, but I can’t remember which.
Technically it is a bug, if it works with manually placed SMs but not with foliage. Regardless though, even if you solved this bug, you would still be left with worse quality results with little to no performance gain