/Engine/Source/Editor/UnrealEd/Classes/Editor/EditorEngine.h
Disables any realtime viewports that are currently viewing the level. This will not disable things like preview viewports in Cascade, etc. Typically called before running the game.
void DisableRealtimeViewports()