Используйте эти опции:
platformio.ini
board_upload.before_reset = usb_reset
board_upload.after_reset = no_reset
Check out similar posts by category:
ESP8266/ESP32 PlatformIO
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow