Steps to reproduce:
- Open the attached project
- Open the SampleScene
- Right-click below the UI document object - observe that the full context menu opens
- Expand the UI document as well as the nested visual elements in the Hierarchy window
- Collapse the expanded UI document
- Right-click below the UI document again
Actual results: Contextual menu only shows "Open in UI Builder" or "Open in UI Builder" and "Select VisualTreeAsset Asset" options if Right-click was performed in the area where the UI document was previously expanded
Expected results: Full contextual menu is displayed on right-click after the UI Document is collapsed
Reproducible with versions: 6000.4.0a5, 6000.4.0b1, 6000.5.0a3
Not reproducible with versions: 6000.0.63f1, 6000.2.14f1, 6000.3.0f1, 6000.4.0a4
Tested on (OS): Ubuntu 24.04, macOS 26.1