ESP32-c3-mini-1 custom board flashing via internal USB causes error

Hello,
I am using Platformio extension on VSCode to flash esp32c3-mini-1. On the last project I was using Arduino framework to flash it using internal USB controller and it worked fine. Now I started new project using espressif32 framework but with the same chip. I have installed lib-usb drivers using zadig and flashed for the first time shorting IO9 and GND (Download boot). Programming worked for the first time and the program ran, but when I want to flash new code, I get this error:

Open On-Chip Debugger v0.11.0-esp32-20220706 (2022-07-06-15:48)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
debug_level: 1

adapter speed: 40000 kHz

Warn : Transport “jtag” was already selected
adapter speed: 5000 kHz

Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Error: Failed to get flash size!
Error: Failed to get flash size!
Error: Failed to probe flash, size 0 KB
Error: auto_probe failed
Error: Failed to find bank ‘esp32c3.flash’!

*** [upload] Error 1

I have to short IO9 to GND again to be able to flash new code onto it and have to do this every time, I tested same code on older project with same mcu and it flashes normally, it goes to boot mode by itself, without the need of shorting IO9, so what can be the problem? Is this the hardware problem? But whole USB part is same on both boards. Here is platformio.ini file content:

[env:esp32-c3-devkitm-1]
platform = espressif32
board = esp32-c3-devkitm-1
framework = espidf
monitor_speed = 115200

board_build.f_cpu = 160000000L
upload_protocol = esp-builtin
debug_tool = esp-builtin
build_flags =
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_MODE=1
-I include