Reproduction steps:
1. Open the attached project"URP-SSAO-Bug"
2. Open "SampleScene"
3. Toggle SSAO off and on in Game view
4. Build and Run the project
5. Toggle SSAO off in Build
Expected result: when SSAO is toggled off, the GameObject looks the same in Game view and Build
Actual result: the GameObject looks darker in Build compared to Game view
Reproducible with: 2021.3.22f1, 2022.2.12f1, 2023.1.0b9, 2023.2.0a8
Could not test with: 2020.3.46f1 (Compilation errors)
Reproducible on: macOS 13.2.1 (Intel)
Notes:
1. SSAO might not work in Build without toggling it on in Play mode first
2. In 2021.3.22f1, the checkbox doesn’t work but the GameObject is still darker in Build compared to Play mode