I am perhaps a little to late to the party with a solution for this, however ...
In Finder, find a file of the same type that you want to change the default file for.
Right -click and Get Info
Below the comments section is the 'Open with' section which will allow you to set the default application to open this one file or all files of this type across the whole of MacOS and not just Xcode.
Again, sorry for the delay folks
Also, see https://stackoverflow.com/questions/75463720/xcode-open-with-external-editor
for further info.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: