Harvey It is possible our .desktop file for vscode having inode/directory causing Budgie to do stupid things. 🤷‍♂️ I would have to try reproduce it in a VM.
The relevant information to this is all linked in the issue I posted above. GNOME dev's explanation for this in short:
That’s because your distribution is not shipping a list of default applications for common MIME types.
Some downstream distributors—like Fedora and Ubuntu—do provide defaults that match what they ship, but there are distributors that don’t want to make that decision, so whenever you install an application that handles a MIME type, and whose name comes before Nautilus in the lexicographical order, you’ll get that application as the default.
If you don’t have any defaults at all, I think GNOME will launch whichever comes first alphabetically. VS Code probably sorts alphabetically higher than nautilus (“com.visualstudio.code” vs. “org.gnome.Nautilus”). So there you have it. All major distributions ship defaults to prefer nautilus or their default file manager, except Arch. Maybe some other smaller distros don’t either
So yes, it is related to the inode/directory entry in the .desktop file.