Enable VR/XR on Editor Mode

I’m doing a module for Unity Editor 2021.1 where I need to enable VR/XR and use HMDs to operate with the virtual environment. Such module is supposed to work inside the editor space not in the playmode, which means that I want the module to enable VR/XR via script. Is there a way to achieve this?

Note: XRSettings.enabled is obsolete

Is this related?
https://github.com/Unity-Technologies/EditorXR

I have the seen those, I even checked how EditorVR works. The only problem is that the way they did it, does not work anymore. The way they did it was simply by setting VRSettings.enabled = true;. This is now obsolete and thus does not work. I was looking for a new way (maybe using the namespace below) using Unity.XR;

That does not seem to be true.

VRSettings.enabled existed in 2017, and the code in repository suggests 2019.1.14 where such variable does not seem to exist.

Instead there’s XRSettings.enabled (-_-)

See EditorXR\Runtime\Scripts\Core\VRView.cs . Tear it apart and see how it works.

Yes I know, I miss spelled it sorry. Still XRSettings.enabled throws a warning saying it’s obsolete