Some more information and example code can be found in the Unity forum: https://forum.unity.com/threads/xr-management-controlling-the-used-xrloader-manually.1019677/
Wait, I just realized that this question was about switching to 2D mode for an Oculus QUEST App. In that case ignore my comment, I don't think this is currently supported in Unity. While it's possible to sideload traditional apps and start them via Oculus TV, there's currently no way to switch between such a mode and VR, afaik.
You might have better luck with this by using WebXR. With WebXR it's sort of common to start on a 2D page in a browser and switch to immersive mode and back through some kind of user interaction.