There is a way to do it, but it’s not the most typical way MacOS users do it for everything else, which involves Right Click->Open With->Other->Always Open With. Xcode’s file associations are super aggressive.
I believe that “Get Info”->”Open With”->”Change All…” still works, and there are command line methods or third party tools.
This has driven me to madness too.
select in finder the file that currently opens with XCode, then press Cmd+i. It opens the information panel. There in the Open with section, you can chose the app and then also Change all to not use XCode.
Not something I've ever experienced. Open As... Always works just fine.
> Xcode’s file associations are super aggressive.
They are the same Info.plist format as every other MacOS application.