Trouble with serial monitor in new IDE

I have a Leonardo acting as a keyboard unlocking my PC when an RFID device scans an authorized tag, everything was working well before, when I move to the new IDE, after making changes to the sketch and closing the program down, I need to close the serial monitor window first otherwise the com port becomes sluggish, when I run the IDE, make changes, first close the serial monitor window, then close the software, the COM port behaves normally, any ideas or suggestions?

No ideas, it is a known bug in IDE

Can you please provide your code.

Can you please give a step-by-step description of the steps that result in the behaviour.

Which one?

Roll back to Arduino IDE 1.8.19