csrutil disable
Restart computer
In the terminal, type
sudo open /Applications/TextEdit.app /System/Library/LaunchDaemons/com.apple.ManagedClient.enroll.plist
change
<key>com.apple.ManagedClient.enroll</key>
<true/>
to
<key>com.apple.ManagedClient.enroll</key>
<false/>
So that the changes take effect
The pinned guide didn't work for me (Sonoma 14.3, MBP M3). I couldn't edit the .plist files as instructed (the file is read-only and sudo didn't help). What worked for me though was this very simple guide.
csrutil disable
and reboot in normal modecsrutil enable
. Reboot to normal mode. You shouldn't see the unremovable profiles again in System Preferences/Profiles