Xcode fails to resolve locked Package.resolved file when switching git branches while Xcode app is open

This other thread has more detailed information (but still no solution):

1 Like