Empty STM32L4R5 (with factory default settings) will try peripheral boot through system memory no matter what (bug?). PA9 then becomes output (as USART1_TX). Shall we use a resistor for VBUS?
Strangely an empty STM32L4R5 will try to boot from system memory and then will try all peripherals turning GPIOs to outputs while trying. Of course this is very dangerous if not taken into account in the design of boards that are to be started with "...