The fact that you can read the flash means the MCU is not secure.
The FSEC byte is at 0x40C, and you read 0x32 there.
KEYEN = 0b00 disabled, MEEN = 0b11 enabled, FSLACC = 0b00 granted, SEC = 0b10 unsecure.
In the first post you had:
Connecting to target via SWD
InitTarget() start
InitTarget()
Active Kinetis write protection detected. This could cause problems during flash download.
Note: Unsecuring will trigger a mass erase of the internal flash.
So, it seems like this is not an issue with the security but the flash protection configured in FPROT bytes of the Flash configuration field.
This protection can be removed by Mass erase only:
danielmartynek_0-1635255124530.png
It seems like the programmer cannot mass erase the MCU even though the mass erase is enabled in the FSEC byte.
I think the only explanation is that CSEc is enabled.
Have you partitioned the MCU for CSEc?
If so, Mass erase is blocked by the CSEc engine.
Please refer to: AN12130 Production Flash Programming Best Practices for S32K1xx MCUs
3.2.5.2 Mass erase and CSEc considerations
https://www.nxp.com/docs/en/application-note/AN12130.pdf
Regards,
Daniel