XIAO ESP32C3, unable to upload sketch or re-write bootloader

There is no While(!Serial) in the sketch.
(I found that using printf() instead of Serial.print() works on battery power.)
Just before bricking, the following sketch was written. It was written at most a few times.

#define LED D10
void setup() {
  Serial.begin(115200);
  pinMode(LED, OUTPUT); // LED
//  Serial.println("END of SETUP"); 
  printf("END of SETUP\n");
}

void loop() {
  digitalWrite(LED, LOW);
//  Serial.println("serial print");
  printf("serial print\n");
  delay(100);
  digitalWrite(LED, HIGH);
  delay(500);
}

The day before, the following sketch was used to measure the sleep current.
Comparison of Sleep Currents for XIAO ESP32C6, S3, and C3

// Board Library : esp32 by Espressif 3.0.0-rc1
// Board Select  : XIAO_ESP32C6, XIAO_ESP32S3, XIAO_ESP32C3
// ArduinoIDE compile options left at default
// Vbat = 3.8V

void setup() {
  esp_deep_sleep_start();
}

void loop() {
}