I thought usbLineInfo.lineState would return to 0 after disconnecting communication, but it did not.
Even when it returns to 0, USBCDC.WriteByte() will go into an infinite loop depending on the timing of the disconnect.
We will discuss how to fix it.
A simple solution would be to stop sending if it takes more than Xmsec to send a single message.