It runs fine when debugging but if you attempt to upload to the App Store it will fail. You can work around the issue by going into the Archived app before uploading it and doing this in the root of the framework:
rm MailCore
rm -r Headers
rm -r Modules
rm -r Resources
ln -s Versions/Current/Resources Resources
ln -s Versions/Current/MailCore MailCore
rm -r ./Versions/Current
cd Versions
ln -s A Current
With Xcode 12.3 using SPM with the master branch (and obviously a Swift project in this case for macOS) the framework created does not conform to the spec: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html
It runs fine when debugging but if you attempt to upload to the App Store it will fail. You can work around the issue by going into the Archived app before uploading it and doing this in the root of the framework: