I have implemented the erase protect and app protect in our application. There are commands for locking and unlocking the device.
Actually, during testing I was able to lock the device and unlock the device through JLink commands. And at one point, JLink 'Connect' command was erasing the application even after enabling the erase protect.
So I raised a ticket here at that time and you have suggested some Jlink commands:
# Enable APPPROTECT and ERASEPROTECT of network core
nrfjprog.exe -f NRF53 --coprocessor CP_NETWORK --memwr 0x01FF8004 --val 0x00000000 --verify
nrfjprog.exe -f NRF53 --coprocessor CP_NETWORK --memwr 0x01FF8000 --val 0x00000000 --verify
# Enable APPPROTECT, SECUREAPPROTECT and ERASEPROTECT of application core
nrfjprog.exe -f NRF53 --coprocessor CP_APPLICATION --memwr 0x00FF8020 --val 0x00000000 --verify
nrfjprog.exe -f NRF53 --coprocessor CP_APPLICATION --memwr 0x00FF801C --val 0x00000000 --verify
nrfjprog.exe -f NRF53 --coprocessor CP_APPLICATION --memwr 0x00FF8000 --val 0x00000000 --verify
nrfjprog.exe -p
#Noted: Noted: Before using this command, please ensure that your application has a method to #disable ERASEPROTECT both the network core and application core.
Unfortunately, my device got locked and application is not running as well (looks like erased).

Is there any way to recover ?