If S32K is secured, when using the onboard PEMicro OpenSDA debugger, S32DS will pop up this reminder: Device is secure. Erase to unsecure?

Did you secure the S32K1 before? If the mass-erase was enabled, just re-program it as usual. Refer to AN12130 Production Flash Programming Best Practices for S32K1xx MCUs.pdf
Does the project that was loaded to the MCU before the error occured use CSEc?
Or has the MCU been partitioned for CSEc, even by trying an example project that utilizes the security engine?
Have you tried switching another workspace? Finally, I suggest you try giving S32DS admin rights.