This fixed it for me:
Quitting xCode
Starting xCode
When you start xCode/open a project, it takes a while in the upper toolbar to build the project, also the previews. As I let that run to the end (takes couple of seconds on Macbook Air M1), everything was fine. No changes needed.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: