XIAO samd21 not uploading

Does XIAO ever appear in “Universal Serial Bus controllers or Device” in Device Manager when it cannot be uploaded?

As a last attempt, you might try rewriting the bootloader.
The following link may be helpful.