?? If you unlock BL by fastboot method, it’s trivial to re-lock it.
The only non-reversible method is usually via manufacturer unlock portal.
Even when using another OS? Been trying to find info on relocking my /e/ OS install on my 1+7P and haven’t had any love luck.
Cursory glance at XDA tells me that OnePlus devices need an unlock token for that device to re-lock the bootloader but you would have to roll back to the original factory firmware to do so.
https://forum.xda-developers.com/t/relock-bootloader.4412627/
Sucks that vendors can keep such a tight control on what you can do with your device. Would be nice to have the possibility to safeguard your device with any OS of your choice.