SPM dependencies disappear after build

I have an iOS (Swift/SwiftUI) project. It has several dependencies managed via SPM. When I build my project the dependencies disappear from the project navigator. I have to reset package cache to get them to return. After I build/run, they disappear again. Has anyone faced this issue?

  • I've tried deleting derived data
  • I've tried resetting package caches (this makes them return until the next build)

I'm using the latest stable Xcode release.