Reproduction steps:
1. Open the attached “ReproSerializedReference (1).zip“ project
2. Open “SampleScene” scene
3. Left-click on project folder and select “New Terminal at Folder”
4. Type in “git checkout 1” in the Terminal window and click on the Editor to load changes
5. Type in “git checkout master” in the Terminal window and click on the Editor to load changes
6. Observe the Console window
Expected result: No errors are thrown
Actual result: “Missing types referenced from component ComponentWithSerializedReference on game object Element:
SubClassB, Assembly-CSharp (2 objects)” warning is thrown
Reproducible with: 2021.3.20f1, 2022.2.9f1, 2023.1.0b7, 2023.2.0a5
Could not test with: 2020.3.46f1 (Due to “The list of [SerializeReference] objects being deserialized is from a more recent version of Unity. This is not supported and objects will be skipped.” error in the Console)
Reproduced on: macOS Monterey 12.6 (Intel)
Note: Not reproducible if the project is closed and opened again with “SampleScene” scene already opened and step 2 is skipped