I’m not sure which Ray Tracing setting causes this issue, but I found that if I force all ray tracing effects on and then back off that it fixes the shadowing.
r.RayTracing.ForceAllRayTracingEffects 1 r.RayTracing.ForceAllRayTracingEffects 0