Reproduction steps:
1. Open the attached "BuildFail" project
2. Go to File > Build Settings
3. Select the Target Platform “macOS”
4. Press the Build button
5. Observe the Console
Expected result: Build is completed successfully without any Console errors
Actual result: Build fails with Console errors ”UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)”
Reproducible with: 2021.3.23f1
Not reproducible with: 2021.3.22f1, 2021.3.24f1, 2022.2.17f1, 2023.1.0b14, 2023.2.0a12
Fixed in: 2021.3.24f1
Couldn't test with: 2020.3.47f1, 2022.1.0a1 (no Apple Silicon Unity Editor)
Reproducible on: macOS Ventura 13.2.1 (M1 Max)
Not reproducible on: macOS 13.3.1 (Intel)