An important part of your question is…
The Arduino IDE is only communicating with the board when it’s uploading, or the Serial Terminal is active.
Otherwise, the USB-COM port is available for other applications to interact with your program running on the arduino board.