I’m not sure what your doing different to me. I use vscode on a laptop with it connected to the zynthian via SSH plugin. I tend to stay X in the vscode terminal but it also works from a separate ssh session, with the display set, e.g. DISPLAY=:0 X -r -s 0&. I start the debugger in vscode with the F5 key and access zynthian via VNC. I stop the debugger with the stop icon in vscode and start it again without issue.
The physical display can become blank. This can usually be fixed by running, powersave_control.sh off because there is a background task that blanks the display which can kick in and does not get reset by the python code.