LED lighting up dimly when uC is in reset
It reads in the reference manual that this particular MCU series use PB4 for one of the USB-C connector CC pins. This means that the pin has support for an internal 5.1k pull-down feature turned on by default at reset time, as otherwise it might not be possible to use the bootloader to download firmware over USB-C connector. Thus if JTAG needs to be used then the pull-down can be disabled. So it will affect the LED too.