I had the same problem on Xcode 13.4.1, I've downloaded Xcode 14 beta 3 and the problem is now fixed, seems like its a Xcode bug.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: