How to reproduce:
Open the attached project "UI test.zip"
Reproducible with: 2022.3.53f1, 6000.0.28f1, 6000.1.0a5
Could not test with: 2021.3.46f1 (compilation errors in the Console window)
Reproducible on: Windows 10 22H2
Not reproducible on: No other environment tested
First few lines of stack trace:
0x00007FF9DB6B8F40 (mono-2.0-bdwgc) [C:\build\output\Unity-Technologies\mono\mono\metadata\object.c:7377] mono_object_get_class
0x00007FF605CA0D05 (Unity) scripting_object_get_class
0x00007FF605D610C5 (Unity) TypeTreeCache::GetTypeTree
0x00007FF605D501BE (Unity) SerializedFile::SerializedType::CompareAgainstNewType
0x00007FF605D560A2 (Unity) SerializedFile::ReadObject
0x00007FF605D55E16 (Unity) SerializedFile::ReadObject
0x00007FF605D3AD15 (Unity) PersistentManager::ReadAndActivateObjectThreaded
0x00007FF605D384C0 (Unity) PersistentManager::LoadRemainingPreallocatedObjects
0x00007FF605D37765 (Unity) PersistentManager::LoadFileCompletelyThreaded
0x00007FF605962DEE (Unity) LoadSceneOperation::Perform