It seems like anywhere I read, it says the same thing: It Does Not.
Before iOS14
NSPersistentCloudKitContainer only worked with Private Database
iOS14 +
NSPersistentCloudKitContainer works with Public & Private Databases
Soo
NSPersistentCloudKitContainer does not work with the Shared Database even if you use CKShare to share the underlying CKRecord object. The user can access the shared object and modify it but through CloudKit Apis and not via NSPersistentCloudKitContainer sync mechanism to CoreData.
Also, I have red multiple responses by Apple Engineers, and no where they hinted that they are working on it,
or that if it is something technically viable for the future.
So at this point, I don't know what to do, since obviously using CKShareApi outside CoreData will require a huge amount of App rewrite.
References:
https://developer.apple.com/forums/search/?q=NSPersistentCloudKitContainer