Arduino IDE not uploading code to NANO when serial monitor is open

I need the serial monitor open but I don't want to go and switch to my UNO just to see my serial monitor, please help.

Sketch uses 2756 bytes (8%) of program storage space. Maximum is 30720 bytes.
Global variables use 212 bytes (10%) of dynamic memory, leaving 1836 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\Miyuki\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\Miyuki\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM8" -b57600 -D "-Uflash:w:C:\Users\Miyuki\AppData\Local\arduino\sketches\E3E52CB847E26C56A47B5ADC2BD2321F/mamvenus.ino.hex:i"

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

 System wide configuration file is "C:\Users\Miyuki\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" Using Port : COM8 Using Programmer : arduino Overriding Baud Rate : 57600 

avrdude: ser_open(): can't open device "\.\COM8": Access is denied.

avrdude done. Thank you.

Failed uploading: uploading error: exit status 1

I was hoping there would be a fix so that I wouldn't need to manually close serial monitor every time, but seems like it's a bug, please close this thread, thank you.

Is your Nano a clone board with a UART chip with no markings and comes up as an FTDI device by any chance? This is something of a known issue with these unknown UART chips.

If your Nano is an original (or true clone) with FT232 serial-to-usb adapter, it is indeed a bug; see "Access is denied" error when uploading to board w/ FTDI USB chip with Serial Monitor/Plotter open · Issue #1783 · arduino/arduino-ide · GitHub.