The problem was indeed the EnableSwiftBuildSystemIntegration.
Setting it to 0 was not working, though. I got a response from an engineer through feedback assistant.
Completely removing the key fixed this issue.
This worked for me:
defaults delete com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration
restart Xcode
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: