It's hard to know what is happening here without seeing the project you are trying to build/use.
Is it possible to include that in a bug report on https://feedbackassistant.apple.com?
Thanks!
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: