I know you have done it. You're spelunking through the code trying to find that one function with that one bug and you find it! VSCode shows you the file of interest in preview mode.
Of course, it's so simple and if I just check to make sure it works with what I'm working on. .
Then... gone. That file you spent so long trying to find was opened in preview mode and now you have to search again to find it. I know it's happened to you. Make it stop by setting both of these to false (or unchecking)
Search and keep your context. Live long and prosper.