So I was able to reproduce your situation and successfully reverted back to stock from QMK.
To do it I connected by ssh from laptop and run command twice. As I understand after first try it go to bootloader state and flashing works on the second run. (Probably you can replace ssh with external keyboard):
first time:
$ sudo ./flash.sh
Failed to open serial device.
Failed to open serial device.
/usr/bin/dfu-util -d 1EAF:0003 -a 2 -D uconsole_keyboard.ino.bin -R
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
dfu-util: No DFU capable USB device available
Waiting for /dev/ttyACM0 serial...arm64
Done
Keyboard now disabled, only restart will help:
$ sudo ./flash.sh
Failed to open serial device.
Failed to open serial device.
/usr/bin/dfu-util -d 1EAF:0003 -a 2 -D uconsole_keyboard.ino.bin -R
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 1eaf:0003
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #2 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 1024
Copying data from PC to DFU device
Download [=========================] 100% 33824 bytes
Download done.
DFU state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Resetting USB to switch back to runtime mode
Done!
Waiting for /dev/ttyACM0 serial...arm64
Done
It helped without restart. Bye-bye QMK.