STM32 ADC sampling with timer and DMA and send data to computer with USB
Agree  I suspect the USB transfer is taking longer than you expect.  Set the ADC up as a separate DMA/interrupt task to fill buffers and never stop transferring into clean buffers.  Then let the USB just transfer the buffers to the PC as they are filled