Sign out from iCloud is greyed out even though no restrictions are set
I'm trying to release my son's iPhone but the Sign Out button in Settings->Apple ID is greyed out and there is a text "Sign-out is not available due to restrictions".
Earlier today I removed the sim card from the phone, put it in a new iPhone and installed the new phone from an iCloud backup.
The phone has iOS 12.0.1, it is connected to Family Sharing and the account is a child account. The only restriction we have enabled in Family Sharing is that all downloads must be approved by me. The Content & Privacy Restrictions found under Screen time are not enabled.
I've tried to enable the Content & Privacy Restrictions, reboot, disable, reboot but to no avail.
Please help or advice on how we can disconnect the phone from the iCloud account.
Thanks,
Mathias
iPhone SE, iOS 12.0.1