How to reproduce:
1. Open the attached project "UITAuthoringBug"
2. Go to Repro -> Bug 04 -> 1. Snapshot before extraction
3. Drag "Assets/UITAuthoringRepro/NameCarryOver.uxml" from the Project window into the Scene view
4. Open the UI Viewport window and select the created UXML GameObject
5. In the Hierarchy, expand the UXML GameObject, right-click the "panel" element and select "Create Template..."
6. Save the template as "Assets/UITAuthoringRepro/PanelTpl.uxml"
7. Press Ctrl+S to save the document
8. Go to Repro -> Bug 04 -> 2. Check result after extraction
9. Observe the Console and the UI Viewport
Expected results: The template instance that replaces "panel" keeps the element's name, so the instance occupies the same position under the same name and USS and UQuery written against that name keep targeting it
Actual results: The template instance is unnamed - it is written as <ui:Instance template="PanelTpl"/> and the Hierarchy row reads "Instance". The name, class and inline style stay on the extracted element inside the new template, so the named element is now nested one level deeper than the position it used to occupy
Reproducible with: 6000.7.0a6
Can't test with: 6000.3.17f1, 6000.5.10f1, 6000.6.0f1, 6000.7.0a5 (No such functionality)
Reproducible on: Ubuntu 24.04.4 LTS (x86_64), macOS Tahoe 26 (M1)
Not reproducible on: No other environment tested
Note: CreateTemplateFromElementCommand.Execute() only sets the templateUXML attribute on the new
instance's serializedData; it does not transfer the source element's name, classes or inline style
to the instance. The classic UI Builder keeps the name on the created instance.