I guess you have to change the settings on the VSCode, go to File->Auto Save(unmark the option). After that the project will restart only when you use ctrl+s on the specific path.
Edit: I did some tests on my computer and I reproduced what you trying to mean, probably you are trying to use diferent extensions that nodemon does not support.
Take a look on this part of the documentation:
Specifying extension watch list By default, nodemon looks for files
with the .js, .mjs, .coffee, .litcoffee, and .json extensions. If you
use the --exec option and monitor app.py nodemon will monitor files
with the extension of .py. However, you can specify your own list with
the -e (or --ext) switch like so:
nodemon -e js,jade Now nodemon will restart on any changes to files in
the directory (or subdirectories) with the extensions .js, .jade.
try to run nodemon -e ts,json(all extensions that you want to be listener) dev-server.js
. When I removed the extension I got the same issue of you.