How to reproduce:
1. Open the attached project “IN-135458”
2. In the Project window, open the “Assets/UI Toolkit/UIDoc” asset
3. In the UI Builder hierarchy, select “NegativeCircleElement”
4. Press ‘F2’ on your keyboard, enter “test”, then press ‘Enter'
5. Observe the name shown in the Hierarchy
6. Save the file
7. Observe the name shown in the Hierarchy again
Actual result: The given name is not shown
Expected result: The given name is shown
Reproducible with: 6000.4.0a2 (417aa67423b3), 6000.4.0b10, 6000.5.0a7
Not reproducible with: 6000.0.68f1, 6000.3.10f1, 6000.4.0a1
Reproducible on: Windows 11
Not reproducible on: No other environments tested
Workaround: Changing the custom VisualElement to use “UxmlElementAttribute”
Notes:
- Element gets renamed successfully, however the name is not shown in the Hierarchy
- Deprecation warnings are shown in the Console for the affected VisualElement starting with 6000.4.0a1