Swift Package Manager: Archive does not work with binary dependency

I have created a Package that contains a binary target as dependency to the main target.

The issue is when a client app implements the package, the build works fine in Debug, but when they want to archive the client app, it always fail because the dependency is not being found.

I have taken a look at the logs, and I noticed that when running in Debug mode, there are some extra steps like Copy+Sign the XCFramework dependency, but they are not executed during the Archive.

Is this a know bug?
IS there any solution to this problem?

Thanks in advance for any support!

Debug output:

Archive output: