We have same issue with azure devops MacOS Catalina agent and build with Xcode 12.4 command line. The app builded and distributed with enterprise provisioning profile not worked for iOS 15 devices. Creating new provisioning profile for enterprise distribution and set OTHER_CODE_SIGN_FLAGS=--generate-entitlement-der not enought and got same error for iOS15.
Finally, after we upgrated MacOS agent to BigSur and build with new provisioning profile, Xcode 12.4 than start working for iOS 15.