What is the keyboard shortcut navigate back to the last cursor position in Visual Studio Code?
⌘+U Undo last cursor operation
You can also try ctrl+-
BTW all the shortcuts is here https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf This is really useful!