One of the simplest tricks is to pin one of your most used tabs. By doing this, your VS Code will not close.
Here is the reference tutorial.