Okay that’s weird and shouldn’t happen but also the way to close the serial monitor is to click inside it and press Ctrl+C for abort. Does that work better?
PlatformIO depends on miniterm.py (the underlying serial monitor program) and VSCode here I think. Please file a feature request in Issues · platformio/platformio-vscode-ide · GitHub.
Edit: Issue opened per Pause scroll for Serial Monitor - Feature Request · Issue #2275 · platformio/platformio-vscode-ide · GitHub and serial monitor closing works better with Ctrl+C, so closing for now.