Edition : Windows 11 Pro
Version : 22H2
OS-Build : 22621.2070
Capacity : Windows Feature Experience Pack 1000.22659.1000.0
I noticed that after a windows update, the Arduino IDE had problems to upload the code to the hardware.
The update was "wch. cn - Ports - 3.8.2023.2" device driver.
I could solve it, by downgrading the device driver to "WCH. CN USB-SERIAL CH340 - 3.7.2022.01".
Probably depending on your Windows build, you have to download it separatly from the internet, and install it through the setup tool of it's own.
The big question is how you prevent Windows from upgrading the driver again.
You don't mention the error that you got; something to do with can't set com-state? Or another error.
How old is the board that you're uploading to? Did you buy it recently or is it older than approximately 8 months? That is when the first reports for can't set com-state on the forum seem to have surfaced.
Where did you find this 3.7.2022.01 driver? I can only find 3.5.2019.1 on Microsoft driver site
I do have same issue, D1 R32 board work fine on W10 with driver 3.5.2019.1, but not on W11 with driver 3.8.2023.2. - Serial port 'open' failed on W11