There have been posts in various places over the last few years about WebVR in Electron, and the answer has always been (very reasonably) that it is not a core part of Chromium and so not supported in Electron.
However, WebXR is now a core part of Chromium. As long as you have an OpenXR installation Chromium runs WebXR with no need for special command line options or flags. However, the versions of Electron based on these versions of Chromium still do not allow XR. navigator.xr is present, but attempts to get a webXR session always fail. Is there any information about when we can hope for WebXR support?