Arduino startup as an installed application

Please post your schematic. If your code is too long, make a short simple version that demonstrates the problem and post that in code tags. Most forum members use phones & tablets most of the time and cannot open .ino files.

Without seeing your schematic, and with no link to these led drivers, my guess would be that there are MOSFETs that switch the current, and they do not have pull-down resistors on their gates. So while the mcu is starting up, the gates float, the mosfet's switch partially on and cause the flash.

What is an STM32 AVR?