I had the same issue whilst using the latest esp-idf 5.4, and latest Espressif IDE Version: 3.1.0. (Note, i had been using Ubuntu and WSL2 but it took too much space, so wanted to get the WIN only dev environment working, even though it still needs WSL)
BUT, kept getting lockouts on the UART, as frequent as everytime I hit build, or 'Go' to flash and open the Terminal within the IDE. Tried to load all the various new drivers, inc 'CP210x Universal Windows Driver' v11.4.0 12/18/2024, also the old rollback to 6.4)
The solution, which works EVERY time: We get a stray PYTHON App/Task - you can kill all of them, it doesn't stop the IDE from working, its just the old TERMINAL that is still running in the background (even though you hit the 'X' and killed it in the IDE'
Killing the 'PYTHON' app, allows you to re click the 'RUN' icon and now finds the UART and programs it.