I also experienced this whilst attempting to flash the /e/ OS on a friend’s FP4. I attempted to roll back to the FP4 factory OS using the ROM and instructions on the FP site - but having done this & locked the bootloader I got the same “Your phone is corrupt and will not boot”. The OS booted up OK before I locked the bootloader.
I don’t know if this is a separate problem or if the /e/ install borked the phone for the FP4 OS ROM too, but the OS install has disabled remote unlock from fastboot so I seem to be in a hard brick situation. I think probably the solution would have been to have re-enabled OEM unlocking as soon as I had a bootable OS? (even though this wasn’t in the instructions!) Hope someone can learn from my experience!
There doesn’t seem to be any unbricking hacks out there for the FP4 yet so I think I’m at the mercy of FP support, unless anyone here has any ideas.