There's a really cool PR in esptool-js which adds reconnection support.
espressif/esptool-js#212
There's a basic demo here, but I suggest you change the reconnect from 1000ms to 100, and iterations to 50/100, then you can see it at it's best.
It reconnects so reliably that you can see the WipperSnapper boot messages every time (tinyusb disconnecting serial and reattaching serial+MSC on Windows).
https://tyeth.github.io/read-partitions-esptool-js/pr/4-770920e/
Adding this to circuitpython web editor would be awesome.
In a similar vein I wondered about using it with the installer processes (both wipper and circuitpy), as in my head if we connect once to the jtag vid/pid, and once to the tinyusb one, we'd maybe be able to detect and reconnect to both at will.