Why when i load a firmware for my macros it disconnects my boards i get this this avrdude.exe: ser_open(): can't open device "\\.\COM5": Access is den

i have legit arduino products aswell
== Port selection ==

  1. COM1
  2. COM3
  3. Enter manually
    Pick number: 2
    Downloading: https://github.com/chapterrrr/fuzzy-carnival/raw/refs/heads/main/arduino_logitech_102.hex
    [========================================] 100% 0.1 / 0.1 MB 0.0 MB/ss
    Saved to: "C:\Users\hello\AppData\Local\Temp\arduino_logitech_102.hex"
    Upload now? [y/N]: y
    [Leonardo] 1200-baud touch on COM3...
    [Leonardo] Waiting for bootloader port...
    [Leonardo] Bootloader port: COM5
    [Leonardo] Attempt 1/6...

"C:\Users\hello\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\bin\avrdude.exe" -C C:\Users\hello\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\etc\avrdude.conf -v -patmega32u4 -c avr109 -P COM5 -b 57600 -D -U flash:w:C:\Users\hello\AppData\Local\Temp\arduino_logitech_102.hex:i

avrdude.exe: 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\hello\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\etc\avrdude.conf"

         Using Port                    : COM5
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600

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

avrdude.exe done. Thank you.

[Leonardo] avrdude failed (code 1). Retrying...
[Leonardo] Attempt 2/6...

"C:\Users\hello\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\bin\avrdude.exe" -C C:\Users\hello\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\etc\avrdude.conf -v -patmega32u4 -c avr109 -P COM5 -b 57600 -D -U flash:w:C:\Users\hello\AppData\Local\Temp\arduino_logitech_102.hex:i

avrdude.exe: 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\hello\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\etc\avrdude.conf"

         Using Port                    : COM5
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600

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

avrdude.exe done. Thank you.

[Leonardo] avrdude failed (code 1). Retrying...
[Leonardo] Attempt 3/6...

"C:\Users\hello\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\bin\avrdude.exe" -C C:\Users\hello\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\etc\avrdude.conf -v -patmega32u4 -c avr109 -P COM5 -b 57600 -D -U flash:w:C:\Users\hello\AppData\Local\Temp\arduino_logitech_102.hex:i

avrdude.exe: 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\hello\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17\etc\avrdude.conf"

         Using Port                    : COM5
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .

The first thing I'd check is that nothing else has that port open. The Serial Monitor, or plotter, or some other terminal program (or even a previously failed avrdude instance that didn't finish and relinquish the port).

Please edit your post, select the output that you showed and click the <CODE/> button to apply code tags; next save your post. This makes the output easier to read and copy.

Which application are you using to upload the file?

For boards with native USB (like your Leonardo(?)) it's normal that the port changes. The application on the Leonardo is running and providing a port. At the moment that a software reset is received the bootloader is invoked which (on Windows systems) will result in a different port. You can monitor that process in Windows device manager if so desired.