Steps to reproduce:
1. Open the attached “IN-123831.zip” project
2. Open the “BugScene” scene
3. Enter Play Mode
4. Observe the colored square
5. Exit Play Mode
6. Select “UIDocument” GameObject in the Hierarchy
7. Enter Play Mode
8. Observe the Game View
Expected Result: The square is displayed as before
Actual Result: The square is not displayed
Reproducible with: 6000.3.0b6 (342471dcaf1d), 6000.3.0b10, 6000.4.0a4, 6000.5.0a1
Not reproducible with: 6000.0.62f1, 6000.2.12f1, 6000.3.0b5
Reproducible on: Windows 11 Pro (24H2)
Not reproducible on: No other environments tested