No Shadows after using ForceAllRayTracingEffects command

I’m using the command r.RayTracing.ForceAllRayTracingEffects 0 to turn off Ray-Tracing, but when I do almost all of my shadows disappear except from those cast by dynamic directional lights.

The most noticeable difference is the dynamic spot light attached to the player that acts as a flash light. The light has cast shadows, cast static shadows, cast dynamic shadows, and cast ray tracing shadows all ticked.

What might be causing this? Is there a more conventional way to turn off Ray-Tracing (not in the project settings, as I want to be able to turn it back on) that won’t have this effect?