XIAO_ESP32C3 Serial.print() excution time depend on serial monitor ON/OFF

I added “Serial.setTxTimeoutMs(0);” according to the comments in the link below and that solved the problem.
ESP32C3M1: Serial.print() calls when not connected to USB cause delays. · Issue #6983 · espressif/arduino-esp32 · GitHub