if you are using ray traced shadows in directional light then this problem will be stay either turn it off or even if you want to have ray traced shadows with nanite foliage try this CVAR
r.RayTracing.Geometry.InstancedStaticMeshes.EvaluateWPO 1
works for me always, if this works in the editor then add it to the engine .ini file for to take effect whenever you open the project or you’ll have to add this CVAR everytime you close and open the project.