Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/UIDocument.uxml” file
3. Select the “MyElement” element in the Hierarchy window
4. Press the “F2” key to change the name (or right-click > rename)
5. Press the “ESC” key
Expected result: The element name remains unchanged
Actual result: The element name is deleted
Reproducible with: 2022.1.0a16, 2022.3.28f1, 6000.0.1f1
Not reproducible with: 2021.3.38f1, 2022.1.0a15
Reproducible on: Windows 11
Not reproducible on: No other environment tested