If this only seems to be happening with ESP32/ESP8266 flashing tools, it might be worth filing a bug with them? Are you sure they're not still running in the background in some form?
I imagine Windows 10 vs Linux problems are different, but on linux try running stty -a -F /dev/ttyACM0 before and after - it's possible that the communication port settings have got messed up somehow
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
If this only seems to be happening with ESP32/ESP8266 flashing tools, it might be worth filing a bug with them? Are you sure they're not still running in the background in some form?
I imagine Windows 10 vs Linux problems are different, but on linux try running
stty -a -F /dev/ttyACM0
before and after - it's possible that the communication port settings have got messed up somehow