I had same issue today - Xcode 14 corrupted something and Xcode 13 couldn't open the project.
I tried removing ~/System/Developer as @InstantInteractive suggested, but didn't work for me.
However git cloning in a different folder as @fespinozacast suggest worked.
Moving that folder back to original path, also worked fine.