This happens because of the input delay. It's usually caused by the DirectX not being updated to the latest version or by the slow performance of the graphics card. Installing an update driver sometimes fixes these errors. On the contrary, it could be a bug and you need to update the game to a stable version.