Reproduction steps:
1. Open the attached “UIRaycastIssue“ project
2. Open the “SampleScene” scene
3. Enter Play mode
4. Uncheck and recheck the “Toggle Canvas B“ toggle
5. Click the “Button B” button and observe the Console
Expected result: The button is interactable, “ButtonB” was logged
Actual result: The button is not interactable
Reproduced in: 2021.3.6f1
Not reproduced in: 2020.3.37f1, 2021.3.5f1, 2022.1.10f1, 2022.2.0b2, 2023.1.0a3
Reproduced on: Windows 11
Note: Also reproduced in Players