If you haven’t solved it already your easiest option is just reinstalling FPOS and not booting into Android afterwards.
The second option involves Magisk to enable the toggle in developer settings again but is only really necessary if there are no updated factory images available (which there are rn) and you have to install OTA updates before locking (to avoid triggering rollback protection).
Oh and welcome to the community