I encountered the same issue on Windows 11. Like you, I selected the Pixel 8 Pro in the emulator and then opened the emulator in VS Code, but it always appeared outside of my screen.
Later, I opened another emulator called "Medium Phone," and I could see the lower half of the emulator. Then I went into the display settings and changed the screen resolution, and the emulator successfully returned to within my screen (though the same method did not work for the Pixel 8 Pro emulator).
In the Medium Phone emulator, I clicked the settings (three dots) in the lower right corner, checked "Emulator always on top," and then returned to the Pixel 8 Pro emulator. Now it consistently appears on the screen.