First of all, you must plug in the USB serial port, so that the system can virtually create a COM4 serial port.
On the desktop, right-click the computer, select Properties, and then open Device Manager. Click on the port, as shown below, and find CH340(COM5), because the USB serial port of my computer is on COM5. Your USB serial port is in COM4, which is CH340(COM4). Right-click CH340 and select properties.
In the pop-up Settings Properties dialog box, click Port Settings, and then click Advanced, as shown in the figure below.
The Advanced Settings dialog box pops up again. Click the COM5 drop-down list below (your computer should be COM4). When you see that COM 1, COM3 and COM4 are occupied and COM2 is still idle, choose COM2.
Then click OK-OK, and the device manager will flash. After refreshing, it becomes CH340(COM2), and the setting is successful.
If COM 1, 2, 3 is really occupied by the system, it cannot be changed. In fact, the serial debugging assistant can change COM4 without changing it.