Otherwise when Espruino 'resets', it might set the pin state of those up to analogs (saves power) which then kills JTAG until you hard reset into the STM32 bootloader mode (so it doesn't load the firmware any more).
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.
Wow, great!
Welcome to STM32 development!
You probably want to make sure you define the JTAG pins: https://github.com/espruino/Espruino/blob/master/boards/PICO_R1_3.py#L71
Otherwise when Espruino 'resets', it might set the pin state of those up to analogs (saves power) which then kills JTAG until you hard reset into the STM32 bootloader mode (so it doesn't load the firmware any more).