Reproduction steps:
1. Open the attached “BugRepro” project
2. Open Build Settings window (File > Build Settings)
3. Enable “Development Mode” option under “Platform Settings” category
4. Press “Build And Run” button
5. Observe the Console output in the build
Expected result: No errors are printed out
Actual result: Serialization errors are thrown: A scripted object (probably ...) has a different serialization layout when loading. Did you #if UNITY_EDITOR a section of your serialized properties in any of your scripts?
Reproducible with: 6000.0.0b11, 6000.0.11f1
Not reproducible with: 2021.3.40f1, 2022.3.38f1, 2023.3.0b10
Reproducible on: Windows 10, Windows 11 (user)
Not reproducible on: No other environment tested