Ray traced shadows disappear on distant foliage objects

For anyone wondering why it doesn’t work in UE5 the command is:

r.RayTracing.Geometry.InstancedStaticMeshes.Culling