I can't understand, my arduino stopped connecting at some point. I connect to usb and the computer does not see the arduino com-port. Then I reboot '32u4 rst' and the com port appears, then I try to flash, but com disappears and the output error is avrdude: ser_open(): can't open device "\.\COM10". I tried to keep the 'wlan rst/ at least 30 s. as recommended, to reset to factory settings, but nothing helped. Two rx and tx LEDs are on.
avrdude: ser_open(): can't open device "\\.\COM10":
I'm not familiar with your board. But you mention 32U4 so the below might help.
Select a COM port in the IDE, it does not matter which one as long as it's not another board with 32U4.
If your Windows system has a COM1, you can use that.
If you have an Uno / Nano / Mega, connect it and use its COM port; keep it connected.
Start an upload of an innocent sketch like blink or blank.
When the IDE reports the memory usage, double-tap the reset button.
Upload should succeed.
Test if you can consistently upload the blink or blank example without having to go through the above procedure.
Did that happen after you uploaded a new sketch?
The usual explanation for the behaviour that you observe would be that the code that you upload to the 32U4 also contains functionality for the board detection by the PC and to react on the software reset (opening the serial port with a baud rate of 1200 baud) issued by the IDE.
A bug in the sketch or used libraries (it's usually the sketch) can result in the variables used by those two functionalities being overwritten and either of those functionalities will therefore no longer work.