Forcefully Remove MDM from Mac
Reboot into Recovery Mode
Open Terminal and run csrutil disable
then reboot. This disables System Integrity Protection.
After reboot, move the configuration profiles directory: mv /var/db/ConfigurationProfiles /var/db/ConfigurationProfiles.old
Or destroy it: rm -rf /var/db/ConfigurationProfiles
Then recreate it mkdir /var/db/ConfigurationProfiles
Reboot back into Recovery Mode and re-enable System Integrity Protection.
Open Terminal and run csrutil enable
then reboot.
Reboot into normal operation and enroll the Mac into the MDM as normal.