Dont pop out vr preview window when using HoloLens 2

When development on HoloLens with Holographic Remoting feature, You have to push the VR Preview button to see things on HoloLens2. But I can see anything on HoloLens , I just want to see the Output Log window on my pc, not the VR Preview window. But the VR Preview window pop out and above all other window including Output Log window.

Where can I find the source code to see how VR Preview window pop out, and I can write some code in my custom GameMode class to hide the VR Preview window?

Not exactly what you are looking for but:

You could set “Should Minimize Editor on VRPIE” to false under EditorPreferences->Play->PlayinEditor
and then just hit Shift + F1 to regain control of your mouse.