Hello Kui Wu,
The command used by the debugger depends on the debugger you're using, usually, in the Segger debugger first calls a normal to erase all but after detecting if there is secured the MCU there's a message mention this and confirmation if you want to unsecure the device. In this case, the debugger try to unsecure the device first writing to the FSEC[SEC].
Also if check the description from the Erase All Block/Erase All Blocks Unsecure you will notice that in the first one there is the following note:
The Erase All Blocks command aborts if any flash memory is protected by the FPROT register or FDPROT register or if the FlexRAM region is protected by the FEPROT register
This isn't the same for the unsecure, this will try to erase all the memory regardless of the protection the memory has.
Best Regards,
Alexis Andalon