If you're finding that a Supervised iOS or iPadOS device is not responding to commands to rename it, and the device has a Restrictions MDM Profile, verify whether the Allow device name modification setting has been set to False:
If the setting has been included but is unchecked, checking it will allow the device to be renamed.