This wasn’t true for me. In Windowed mode even with the VR headset on, you can accidently close the sim. Try moving your mouse to the top right of your vision and clicking. Most notably it happened with flipping the overhead panel switches on the A320 for me.
Why do you want to play in Windowed mode?