Archive is unusually slow after using Swift Package as a modular tool

I recently modularized my app by creating several infrastructure and feature libraries.

Initially, I managed these libraries using Framework Targets, but I recently tried converting them to Swift Packages. Everything seemed fine after the conversion—local build speeds were just as fast as before. However, the Archive speed is now abnormally slow, to the point where Xcode Cloud builds are timing out.

To give a local example: archiving using Framework Targets takes about 1 minute 50 seconds, but after switching to Swift Packages, it shot up to 8 minutes 30 seconds.

I tried to investigate the differences. Framework Targets default to dynamic libraries, while Swift Packages default to static libraries. I didn't think static linking would cause such a massive slowdown, but I tried converting all my Swift Packages to dynamic libraries anyway. Unfortunately, the result was the same.

I noticed that the increased build time isn't coming from the libraries themselves, but from the App Target. Since we are in the early stages of modularization, a lot of code still remains in the main App Target. I don't understand why simply introducing Swift Packages would cause the App Target's compile time to increase so drastically for the same code.