Does it work every time after that? Intermittent connections sound like a bad cable or a too-high frequency signal going through it.
This drives the cable at 20MHz, crappy breadboard cables might not like that. You can decrease the frequency in <home folder>\.platformio\packages\tool-openocd-esp32\share\openocd\scripts\board\esp-wroom-32.cfg
at the adapter_khz
line if needed.