Closing WebXR session minimizes browser on Quest2

Hello,
I’m having an issue with XR sessionson Meta Quest2.
In my project the user can start a XR session by clicking a button that launches this line:

mainCamera.camera.startXr(pc.XRTYPE_VR, pc.XRSPACE_LOCALFLOOR);

In certain conditions I need to force the session to end and I’m using this command:

this.app.xr.end();

Now the XR session is correctly ending but the browser’s window is minimized to traskbar.
How can I prevent this behaviour?

Thanks in advance.

hoping @moka might know