Sounds like you are actually only erasing the Volume and not the Disk.
When you boot to your Recovery HD and select Disk Utility
click on View in the menubar and select Show All Devices.
In the left hand panel you will now see all the Volumes and the Disk will be
the uppermost probably called Apple SSD or similar.
Highlight the Disk not any of the indented Volumes.
Now click Erase.
Give the Disk a name.
Format: APFS.
Scheme: GUID Partition Map
Click Erase.
This will erase the entire disk.
What OS are you hoping to install on your mac.
If it is an older OS like Sierra or older change the
Format to Mac OS Extended (Journaled).