Hi there,
SO, I have found this also occasionally to occur while stacked. Placing the Xiao in Bootloader mode manually(button Press) and retrying overcomes it. I have only noticed this phenomenon with the IDE version 2.3.5 Arduino. YMMV
Subsequent uploads complete normally
HTH
GL PJ