How can I use VSCode to open a file/folder on a remote Linux machine in macOS?
Running VS Code this way doesn't establish bidirectional communication with your remote server, it only pulls the files you tell it to open.
To establish this bidirectional connection, I use FUSE and SSHFS on my mac (OSX FUSE). You can mount a remote directory to a local one through an SSH tunnel
sshfs user@remote:port/path/to/remote/working/dir /path/to/local/working/dir
This allows you to access those remote files on your local machine. Opening VS Code in this local directory allows you to access and edit files on the remote server, using a local application.