Another way is to toggle J4125 GPIO to reset rp2040 and put it into BOOTSEL mode if you are running Linux on J4125:
ps@ps-palmshell:~$ cat usb.sh
#! /bin/bash
sudo gpioset gpiochip1 60=1
sudo gpioset gpiochip1 61=1
sleep 1
sudo gpioset gpiochip1 60=0
sudo gpioset gpiochip1 61=0