Hey all, I seem to be having a similar problem.
I am trying to factory reset my iMac so I can sell it, so I went to Recovery Mode first by restarting my iMac and holding down “Command” and “R”, I then proceeded to go into “Disk Utility” and go to “Macintosh HD” and clicked “Erase” under the “APFS” format.
When I tried to reboot my iMac I went into Internet Recovery Mode with the spinning globe.
From here I went to “Reinstall macOS and tried to install “High Sierra”, it then showed that the drive was locked.
I have attached pictures of the screens I see, along with my set up before I tried to Factory Reset and my “diskutil list”.
Any help would be GREATLY appreciated!!