I this for now we can use this code:
navigator.xr.isSessionSupported('immersive-vr')
Only in vision pro this expression return true.