Arduino Due gets crazy if unplugged while sending

I can't reproduce your issue, I suspect something weird from the PC side.

Let's try that: You upload your sketch, select the correct Native USB COM port, open the Serial monitor window.

--> You see a correct output

--> Now close the Serial monitor window, but do not unplug the USB cable from the native USB port

--> Reopen the Serial monitor window. Do you have a correct output ?