How to reproduce:
1. Open the project “IN_34675”
2. Open the “SampleScene” Scene
3. Select the “test” Prefab in the Hierarchy
4. Press on the “Overrides” → “Unused Overrides” → “remove”
5. Select the “test2” Prefab
6. Observe the “Test 3” script field under the “Element 0” in the “Test 3 List” in the Inspector
Expected result: “test2 (Test 3)” is attached
Actual result: no scripts are attached
Reproducible with: 2022.2.0b7, 2022.2.11f1, 2023.1.0b8, 2023.2.0a6
Couldn't test with: 2020.3.46f1, 2021.3.20f1, 2022.2.0b6 (due to compiler errors)
Reproducible on: Windows 10 Pro