The fact that this bug that's related to the core features of the SPM still exists after several versions of the IDE is mindblowing.
Whenever I change branches, it starts to update dependencies altough all branches have the same .resolved file in them and failing to do so randomly is extremely frustrating. Closing Xcode before switching branches doesn't always work either. I have to randomly try resetting package caches multiple times and restarting the IDE several times to make it work again. A collosal waste of time.