Double check Xcode->Settings...->Locations->Advanced...->Build Location must not be Legacy.
I'm on Xcode 15.1 and for me, this wasn't set to Legacy. However, there's also File > Project Settings… > Advanced… > Build Location and that was set to Legacy. Changing it to Xcode Default and reloading the project helped.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: