Hi, Ioannis,

How are you ???

For one, you may show us the output pin of that PIC reseting as you suspect. Is it really reseting?
That could be done just checking the dedicated bits of the processor, then powering small LEDS showing what happened.

BUT that needs some more datasheet reading, and I do think our friend has to be led to Pic datasheet § 8.13 ... just for that checking.

It's a long way from idea to working device ... but you already know that

Best Regards
Alain