Hi @ajnas-c
Are you able to attach the debugger again after reset and check following registers in MC_RGM module?
Destructive Event Status Register (DES)
Functional /External Reset Status Register (FES)
These registers contain information about the sources of reset.
If you are not able to attach your debugger in this situation, second option is to add a code to your project which will
1. Read the registers and log them (write to flash, send to UART...)
2. Cleat the flags, so you will see only the most recent source of reset next time (the flags are cleared only by power-on reset).
Regarding JTAG access – it is possible to restrict debug access via password.
And there are two ways – it depends if the HSE firmware is installed or not.
If HSE FW is not installed:

Customer needs to program field CUST_DB_PSWD_A in UTEST memory with the desired password and then advance the lifecycle.
In order to advance lifecycle:
1) Set the address of LC configuration word in the IVT/bootheader. LC word can be at any flash address selected by customer.
2) Write in such address the value for LC word corresponding to target lifecycle:

For device with HSE FW installed, the APP_DBG_PASSWORD is a 128-bit key/password which is programmed by HSE(i.e. by HSE set attribute service). And it can be used for static(Password) or dynamic(Challenge Response) secure debug authentication mode. You can check section “3.6.3 Debug” in HSE-B Firmware Reference Manual for details.
Regards,
Lukas