This code will apply the ViewMode even in Shipping builds:
ApplyViewMode(EViewModeIndex::VMI_Unlit, false, *()->GetGameViewport()->GetEngineShowFlags());
Make sure to call it once at beginning of your game’s logic.
Like said you could play directly with the FEngineShowFlags (returned from GetEngineShowFlags()) to set and unset uneccessary rendering features.
Unfortunately, it seems this changes a core .ini file and applies properties even after restart. Still fixes the problem, but now setting to lit in the editor window doesn’t work correctly anymore. WARNING
Note: The second parameter is bPerspective, mine is set to false because i’m using an orthographic camera. Make sure the set it to true if you are using a Perspective camera