> I have written a custom bootloader and app that share a sector.
I think this is not a good idea.
Flash can only be erased sector-wise, and I believe the LPC55S is not different.
I suppose you have only tried your bootloader so far with an otherwise empty sector (except for the BL code). Programming works down to minimal cell size usually 16 or 32 bit. Easing does not.
Check if the bootloader can erase an existing application without killing itself.