Yes, Arduino 2.0 is a freshly released version of the IDE it seems still to have some teething issues and many of these are being tracked, but in the mean time:-
Go back to using 1.8.19
Hi @xotho. I'm sorry the Arduino IDE is not working well for you.
It is not beta.
Many thousands of people are now using Arduino IDE 2.x. We have had a few reports of this type of problem, but only a few, and some of those have already been resolved by the configuration of the antivirus (I know you say that is not the problem for you, but it was for others).
If a significant percentage of users were experiencing the problem you are, this forum and our bug tracker would be absolutely swamped with reports, yet they are not. I realize that a problem that only affects 0.01% of users is still just as much a problem personally when you are one of the 0.01%, but please don't make the assumption that all users are experiencing the same.
How did you determine this? Did you try disabling the antivirus software completely just long enough to run a quick test?
If the problem also occurs when using Arduino IDE 2.x, then it is definitely not. The reason is that, unlike Arduino IDE 1.x, Arduino IDE 2.x does not use Java in any way. It is a complete rewrite of the application done in the TypeScript language.