I managed to stop this bug from happening by explicitly specifying the Tracking Origin Mode in the XR Origin component. We had it as "Not Specified" all this time. At runtime it would spam with the tracking origin mode always being "Floor" so unfortunately KBaker's fix does not work in our case (thank you anyway for your help). Explicitly specifying "Floor" fixed this issue.