If MCU is censored, it behaves according following table:
SIU_RSR(BOOTCFG[0:1]) , boot mode, internal flash state, nexus state
00, internal boot, enabled, disabled
01, serial boot, disabled, enabled
10, external boot, disabled, enabled
11, external boot, disabled, enabled
I don’t see any reason why fully erased shadow flash should block booting from internal flash, I would rather guess you have changed something else. I would recommend to only modify serial passcode and control word with private password in order not to permanently lock the device.
Pay attention to following appnote:
http://cache.nxp.com/files/32bit/doc/app_note/AN3787.pdf