At the command line on a Mac is a command, which can fix two different issues
1. If you get an error like this
ERROR] MDM_Connect: Unable to create MDM identity from persistent reference: -25304 (The specified item is no longer valid. It may have been deleted from the keychain.) for profile: MDM Profile.....
2. If you've assigned the wrong DEP profile to a Mac and want to change it, or if you want to make an non removable MDM profile removable, or vice versa
NOTE: This is quite a powerful command, so be careful
This command will essentially re-enroll a DEP Mac, refreshing management profiles (can be useful for expired certificates, especially SCEP certs). If you've made an changes to your DEP profiles, and assigned a new one to this Mac, it will get whatever new capabilities you've enabled.
Open the Terminal App
sudo profiles renew -type enrollment
You'll be prompted for your Mac password
You'll notice a notification in the top right of the screen:
Systems Preferences should now open:
Clicking Update will now re-enroll the Mac
I hope that this is useful. As mentioned, it fixed a broken enrollment for me, but also allowed me to change the "removable" status as well.