Trouble with connecting to the ttyUSB0 port on upload

Hello,
I’m having trouble connecting to the USB port (ttyUSB0) after compiling.

I’m not sure whether that is a specific problem related to pio or a more general problem.

After a few cycles of compiling/uploading a sketch suddenly its posting the message

A fatal error occurred: Could not open /dev/ttyUSB0, the port is busy or doesn't exist

The command ls -lha /dev/ttyUSB* shows crw-rw-rw- 1 root dialout 188, 0 Mar 22 12:14 /dev/ttyUSB0 .

I also run dmesg grep | ttyUBS* which shows [751240.961172] usb 3-2.1.1: ch341-uart converter now attached to ttyUSB0 as last line.

It seems I can’t fix the problem except I’m closing pio and open it again. Which then makes the USB port available. I don’ think that can be the only measure to deal with the problem.

Is there anything else I can do to avoid the problem?

I know a similar problem was discussed here :

but it seems to be of a different nature than my problem.

Any help is much appreciated.

TIA