I know that there are a number of topics (and issues on GitHub) regarding disappearing ports after an upload for boards with native USB. One of them is that the port needs to be selected again, even if it did not change due to enumeration by the operating system.
I use 32U4 based boards and I don't have that problem (except if the OS gives a different port after the upload). However I can kind-of simulate it on a Leonardo (original) by either using a hard reset or a soft reset (open and close port with a baudrate of 1200 baud) to invoke the bootloader. I don't know if this was reported or helps in solving the issue of the disappearing serial connection.
OS: Windows 10
IDE: 2.0.1
Serial monitor: closed
The IDE behaves as expected in the following scenario
Connect the board
Select baord and the port (in my case COM20); the status bar will show "Arduino Leonardo on COM20"
Reset the board (either hard or soft); the status bar will show "Arduino Leonardo [not connected]"
Wait till the bootloader times out; the status bar will show "Arduino Leonardo on COM20"
After step 2, repeating steps 3 and 4 will consistently give the same output in te status bar. Note that I did not upload the blink sketch, the sketch that was there was running.
The IDE does not behave as expected after an upload
5) Now perform an upload (I used the blink sketch); the status bar will go from "Arduino Leonardo on COM20" via "Arduino Leonardo [not connected]" to, when the upload is complete, "Arduino Leonardo on COM20"
6) Reset the board (either hard or soft); the status bar will briefly show "Arduino Leonardo [not connected]", followed by "Arduino Leonardo on COM21" (COM21 is the bootloader port)
7) Wait till the bootloader times out; the status bar will show "Arduino Leonardo [not connected]"
So the IDE picks up the change from 'normal' port to 'bootloader' port but not the other way around. It however is aware of the change back as both tools->port and the dropdown allow me to select the correct port again.
The above test was repeated with a Micro (what's next, formerly arduino.org) with the same results; reset in this case was a double tap on the reset button to invoke the bootloader.
I have seen a similar issue using a Teensy 4.1 if I call resetFunc().
I was using that method to just restart after changing some parms in EEPROM to test the code in startup(). After a random number of cycles the USB connection gets lost. Unplugging the board and/or restating the program correct it. In my case, the port remains selected, but the IDE and Serial monitor think the board is not there
I am not sure what the root cause is (Teensy or 2.0), but it is seemingly similar to your observations.
Everyone should always feel welcome to submit reports directly on GitHub. I think some are more comfortable using the forum and I try to serve as a "bridge" between the forum and GitHub in these cases. The only exception is cases where I am not able to personally reproduce the reported issue, since I have set this as a requirement for myself after ending up in some situations years back where I was not able to follow through on requests for additional information from the developers on issues I submitted due to the original reporters on the forum going AWOL.
Traditionally I have tried to be careful to give the reporters here on the forum an opportunity to make the GitHub issue themselves, both because I wouldn't want anyone to feel I "stole" the report from them, as well as because I think bug reports can serve as a "gateway" to getting involved with contributing to open source software projects. But I'm struggling just to keep my head above water with all the IDE-related work these days so I probably wouldn't end up finding time to circle back to the forum posts to see if the reporter ever submitted an issue on GitHub.