I solved it by enabling the FIFO mode for the target UART.
See: https://community.st.com/t5/stm32-mcus-products/hal-uart-receive-timeout-issue/td-p/403387