Except xdg mime types are easily heist-able by programs and there is no universal truth for it.
Install vscode on Linux and have fun with it hijacking opening directories. Which is easy enough to fix (with a bit of know how) or work around but annoying.
MacOS is far from perfect but open always doing what I expect is a good example of what Apple did well.