VSCode opens single files outside of projects. What do they do? Personally I wouldn’t mind if it just defaulted to the settings of the last-used vault.
If you have a window open, the file is opened to the workspace for that window. You can see this in action because the "Trust" dialog specifically says that you're trying to open untrusted files into a trusted workspace.