Budget: 500 UAH Deadline: 1 day
Good time of day.
This problem is not resolved by the watchdog.
The watchdog reacts to the interrupt of its own controller (itself), and this is not related to the loss of connection with the PC.
Connect a 5-volt relay from your USB, and disconnect the power to the controller from this relay. This is a simple solution. You can pay for a cup of coffee)