The Apple instructions (linked earlier) are clear about erasing the MacIntosh HD volume group, not the drive. On M1 Macs Recovery is on a separate partition, which might get erased if you erase at drive level. Erasing at drive level was common practice with Intel. I don't know if this the cause for you but it might be. So I would be interested to know exactly what you erased.
It would seem bad if Apple even allows the whole drive to be erased and if this then causes the need for Apple Configurator 2 to restore the Recovery partition. I would hope Apple makes it impossible or gives dire warning, in which case your problem is likely to be something else.