serial monitor error/crash
The MCU hangs (or resets due to not handling the watchdog on time), so it stops handling the USB protocol stack, and PC thinks the cable is detached so USB serial port stops existing. You have a problem in the MCU firmware.