Users can be blocked from removing MDM profiles on iOS devices if these devices are enrolled in DEP. You can add devices to DEP using apple configurator.
While configuring the DEP policy, please disable the option ‘Allow MDM Profile Removal’ to block the users from removing the profile. Navigate to Admin-> Apple Business/ School Manager-> Apple DEP-> DEP Configuration Profiles and click on the Configure DEP Profile button for configuring the same.
Please note that if the devices are added to DEP using Apple Configurator, there will be a provisional period of 30 days during which users will be able to remove the profile even if the ‘Allow MDM Profile Removal’ is disabled.