Reproduction steps:
1. Open the attached project “BugRepro”
2. Open “Assets/Scenes/SampleScene.scene”
3. Build and Run to a Quest 2 device
4. Using the right controller, point at the XR Canvas and the Cube
5. Observe the Raycast being stopped
6. Uncheck “stopLineAtFirstRaycastHit” with the trigger on the controller
7. Point at the Canvas
Expected result: Raycast passes through everything
Actual result: Raycast passes through Game Objects, but not through XR Canvas
Reproducible with: 2.3.1 (2020.3.47f1, 2021.3.23f1, 2022.2.16f1, 2023.1.0b13, 2023.1.0a11)
Couldn’t test with: 2.3.0 (Project breaks)
Reproducible on: macOS 13.3.1
Oculus (Quest 2), Android 10, CPU: Snapdragon XR2, GPU: Adreno (TM) 650
Note: Reproducible in Editor and in built Player