Yea like people have said above, try second-curtain sync
Depending on the speed and direction of movement and the intensity of the lights, it doesn’t always work this way but one of the great things about digital is that you can review your results and try something different if you didn’t get what you were expecting.
It bears noting that you can’t precisely control exactly when the flash fires when using second curtain synch. So it’s possible in our example scenario that the subject could be out of the frame before the flash goes off. Second curtain synch requires some practice, a bit of finesse and sometimes luck to use well.