If the device is a DEP-enrolled, after the wipe action is performed on the device, it will get re-enrolled to the portal.
The device can be re-enrolled as a new user or can retain configurations and change the owner. To make the choice, please navigate to Admin-> Enrollment-> Re-enrollment options.
On enabling the ‘Enroll as a new device’ option all the configurations that was set on the device will be removed.
Enabling the ‘Retain configurations and change owner’ option, all the configurations would be retained with a change in ownership.