[dev-tools] Re-focus previous item after closing sub menu (#80099)
This PR fixes a small bug with the menu keyboard interactions. Namely,
if you open a sub-menu and close it, visually the correct item is
highlighted but does not respond when pressing Enter.
The bug is visible here on this video:
https://github.com/user-attachments/assets/368311eb-1400-4a76-b42b-b59676dedef2
After this PR you can infinitely toggle between the menus:
https://github.com/user-attachments/assets/9ff7f5cd-67cf-4db5-a12f-fd1bf8ebe96b