STM32 UART: combining interrupt and DMA modes
Finally, the project was refactored to use STM LL Drivers, and with this approach, allowing to receive variable-length packets with DMA, the problem was solved. Real cause of the problem is still unknown, most likely its a bug in the project code or possible in STM HAL library.