Mouse Looses Focus In PIE (Selected Viewport) fullscreen

On my version of the flying template, the mouse can’t control the plane - only WASD controls the plane’s motion. How did you write the mouse controls?