How to build Swift Package as XCFramework

Yes, the products of the package need to dynamic and despite this, with SPM, framework dependancies of a product are statically linked/embedded in the product. The only way around this I found was to generate an .xcodeproj using Xcode 13 and xcodebuild using that.