How to make the game run in background?

So when in a multiplayer game, if the user clicks on the border to move the game window, this halts the game. Not a problem for a client (if everything is replicated correctly) however if the host does this then everything crashes. How do I enable the game to either run in background or to not halt when moving the window?

Has anyone figured this out?

UGameEngine* GameEngine = Cast(GEngine);
if (GameEngine)
{
TSharedPtr windowPtr = GameEngine->GameViewportWindow.Pin();
SWindow* window = windowPtr.Get();
if (window)
{
window->HideWindow();
//window->ShowWindow();
}
}