How to reproduce:
1. Open the attached "UIDocumentBug.zip" project
2. Open the “SampleScene” scene
3. Press Play
4. Select "UI" game object
5. Observe the Game View
Actual result: The red box disappears once the Inspector is opened
Expected result: The red box does not disappear
Reproducible with: 6000.3.2f1, 6000.4.0a2 (417aa67423b3), 6000.4.0b2, 6000.5.0a3
Not reproducible with: 6000.0.64f1, 6000.4.0a1
Reproducible on: MacOS Sequoia 15.7.2 (M1 Max)
Not reproducible on: No other environments tested
Workaround: Create an empty UI Document (Project Window → Create → UI Toolkit → UI Document) and assign it as the source asset
Notes:
- The box disappears only when the “UI” GameObjects Inspector is opened, if the Inspector window is not opened you can still select the GameObject
- If the Inspector is locked when entering Play Mode the GameObject renders for a moment then gets destroyed and a NullReferenceException error is thrown