Reproduction steps:
1. Open the attached project “SceneGUIBug”
2. In the Hierarchy window select “DemoPrefab” GameObject and open the Prefab Context mode
3. In the Inspector window, under “Test” Script click on the “Listen for beforeSceneGui” button
4. Hover the cursor above the Scene window and move it around it
5. Inspect the Console window
Expected result: Log message “beforeSceneGUI called” in the Console window
Actual result: Nothing is printed in the Console window
Reproducible with: 2022.2.1f1, 2023.1.0a23
Couldn’t test with: 2020.3.42f1, 2021.3.15f1, 2022.1.24f1 - The button is replaced with “No Gui Implemented” text
Reproducible on: macOS 13.0.1 (Intel)