Reproduction steps:
1. Open the attached “Test Project” Project
2. Open Window > UI Toolkit > UIElementsEditorWindow Window
3. Right-click on any number in the list and then right-click another one
4. Observe the selected (highlighted) item
Expected result: The selected item is always the one you right-click on
Actual result: The selected item is the previously selected item until the GenericMenu is closed
Reproducible with: 2020.3.47f1, 2021.3.22f1, 2022.2.14f1, 2023.1.0b11, 2023.2.0a9
Reproducible on: Windows 10