Steps to reproduce:
- Open the attached project
- Open the "SampleScene"
- Fully expand the "PanelRenderer" GameObject in the Hierarchy
- Select the "New UXML.uxml" and click "Open In Context"
- Duplicate the VisualElement and Save and exit In Context editing
- Select the "Card" GameObject under "PanelRenderer"
- In the Inspector, change its "Position" property to "Absolute" or "Relative" (any change triggers the bug)
- Observe "NullReferenceException" is thrown
- Enter Play mode
- Observe the Game view and the Console
Actual results: Multiple "NullReferenceException" errors are spammed with "InvalidOperationException: You can't modify a VisualElement after its resources are released." error and nothing is rendered in the Game view when entering Play mode for the first time
Expected results: No errors and Game view renders all UI elements
Reproducible with versions: 6000.6.0b6, 6000.7.0a4
Can’t test with versions: 6000.3.21f1, 6000.5.6f1 (no in context editing)
Tested on (OS): macOS 26.5, Ubuntu 24.04