In my team, we've discovered that the GameCore for Xbox platform (including Xbox One and Xbox Series) doesn't have an XR module available. Probably because there is no VR/XR hardware for Xbox.
This makes the respective Shaders and Scripts that use XR macros or namespaces fail during compilation and runtime.
This is partially reproducable by disabling the XR and VR module in the package manager.