Reproduction steps:
1. Open the attached project
2. In the Hierarchy window select “Main Camera” object
3. In the Inspector window change to Debug mode
4. Change the Script field to any other script
Expected result: The Script can be changed
Actual result: The Script field is greyed out and cannot be changed
Reproducible on: 2022.2.0a9 2022.2.0b8, 2023.1.0a10
Not reproducible on: 2020.3.39f1, 2021.3.10f1, 2022.1.16f1, 2022.2.0a8
Reproducible with: macOS 12.5