Just had the same issue.. (project based on a Package.swift file, not a regular .xcodeproj)
Doubted that it would have to do something with GitHub's policy as described above, since I've worked on other projects today without any issues.
Tried to clear the derived data folder, as well as the project's .swiftpm
folder and even the swiftpm repo cache.. nothing helped.
Tried the same project on another MacBook and worked fine!
Then made a fresh clone of the project in a different folder on the Mac with the issue and worked fine as well.
So finally I just deleted the local Package.resolved
file, reopened the project in Xcode and everything was back to normal