As mentioned, to remove the restrictions passcode, you must erase/restore the phone. Changing iCloud IDs does nothing. The passcode is kept on the phone itself.
Unlike the lock screen passcode, the restrictions passcode is stored in any backups. So if you have no backups, simply erase or restore, set up as new and carry on.
Your data is lost.