My experience with the FP4 is you can only lock the bootloader with a couple of "official" distro's. And even then there are conditions where this can go bad.
I can use the default factory version provided by fairphone, I can use e/os.
While I can install and use postmarketos or a lineage image, I can't lock the bootloader without turning it into a brick. I believe it is to do with boot partition signing by the CPU manufacturer and the android bootloader checking it.