I solved this for me by quitting VS Code. I had a VS Code open to an unrelated Flutter project. Quitting out of VS Code allowed Xcode to build successfully. Starting up VS Code caused Xcode to start having the same problems.
Topic:
Developer Tools & Services
SubTopic:
Xcode