Even if you restart Visual Studio Code, your WSL instance will keep popping up whenever you run it. To disconnect, press Ctrl + Shift + P, then type remote: close remote connection on the Command Palette.