The NOR FLASH of 32MB on the evk board can be erased properly. However, after the NOR FLASH of 256MB (MX25L25645GM2I-10G) is replaced, the flexspi_nor_flash_erase_sector does not return any error. However, the data in the sector cannot be erased (can read and write data normally).
It is IS25LP064A-JBLE (8MB) in NXP MIMXRT1020-EVK board, SDK flexspi example is mainly for this flash.
If you use different flash, you may need to check Flash Data sheet and modify flexspi example (focus on customLUT) if necessary.
I have one unit test project for your reference:
https://github.com/JayHeng/RT-MFB/tree/main/boards/mimxrt/mfb_fw/src