iCloud is disabled for my iOS app but for share extension iCloud is enabled

I'm testing disabling iCloud for my app (https://support.apple.com/en-gb/HT207689) and it's disabled in my main app but when I use the share extension it's always enabled. I would think that disabling iCloud would disable it for all extensions you might have in your app.

Is there no way to disable iCloud for an extension only for main app?