If Shared With You entitlements are turned on in Xcode capabilities and then try to upload the build to the App Store, the app upload is rejected with no reasons. Removing the entitlements allows it to be uploaded.
No parts of the Shared With You entitlements were accessed in the app, only the entitlements were enabled. This has been confirmed in a simple 'Hello World' app with the same kind of App Store response, which looks like this...
After considerable experimentation, I believe I've solved the app store mystery. If I include the SWY entitlements without any code that bundles the SWY framework into the app, it will fail the upload processing step but with no explanation (which is what our problem was).
If I add code that accesses the api, even though it is surrounded by an 'only in iOS 16' protection, then it will include the framework in the build since the iOS 16 determination is done at run time. And that is good enough to allow the upload to be available in the store, and it can be downloaded in testflight and run as normal, both on iOS 15 and iOS 16 devices.