?? 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/