A standard factory reset does against an MDM lock. The moment you connect to Wi-Fi during setup, the phone "phones home" to Google or Samsung’s servers, re-applies the lock profile. This is known as FRP (Factory Reset Protection) combined with Enterprise Enrollment .
: Many methods associated with this tool allow for unlocking without opening the physical phone. Common Removal Methods samsung mdm unlock tool rajaminus upd