For our mobile and desktop scenes we show/hide DOM elements using CSS when interactivity is needed. This works real well. We want to do the same for HMDs.
when the webxr dom overlay feature was implemented, it was only supported in AR scenarios. There is now a comment in the specs, saying “Implementation choices include a fullscreen overlay on a handheld AR device, or a floating rectangle in space for a VR or AR headset.”. I am not sure, to be honest, which VR device supports DOM overlay. but we can enable it for VR sessions, of course.. We don’t imit WebXR DOM Overlay based on session mode. So - you can use it in VR, if the device supports it.
But I do like @carolhmj’s suggestion to use the GUI. no fullscreen support, but you can attach GUI to a mesh or use the 3D GUI elements