Enabling VSCode to "open/close" the serial Connection in CuteCom/Ubuntu

i would like to ask if there is a option to create something like a script to enable VSCode/PlatformIO to “close” my external Serial Monitor and after uploading Code to the specified Device (e.g. Arduino Nano) to “reopen” that Serial Monitor in CuteCom again.
I would like to “integrate” that somehow in the the actual Upload-Shortcut/Button routine. So if I’m pressing CTRL+ALT+U above mentioned behavior will be applied.

I am using Ubuntu 18.04 and the latest VSCode 1.27.2 and as a Serial Monitor CuteCom 0.30.3