Whenever Windows requires reboot, always use the Teamviewer remote reboot function, so that it will auto re-connect after reboot
Step 1. Actions → Remote reboot → Reboot
Step 2. Reboot
Step 3. Wait for parther
Step 4. Reconnect