Ventura docs for M2 Macs in this comment: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd?permalink_comment_id=4555340#gistcomment-4555340
Old Monterey docs in this old revision: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd/32c410e3a1de73539c76fa13ea5486569c4e0c5d
Solution for Sonoma: https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac
Method confirmed dead on Ventura. Now MDM lock works in a similar way to FMM lock. For all of you legally owning DEP enabled Macs, disabling Full Security is highly recommended so that when you accidentally wipe the mac, you will be able to always downgrade to a full installation of macOS <=12.x. For Macs shipped with Ventura from now on, be extra careful unless new ways of MDM bypass come out.