The player can perform sweep attacks on an entity while they are sprinting if they perform one 'knockback' attack first on their target.
Steps to Reproduce:
Place down an armor stand
Get a wooden sword
(In survival) Start sprinting
Attack the armor stand
While continuing to sprint, attack the armor stand again
Expected Result:
The player would not be able to perform a sweep attack while sprinting.
Observed Behavior:
After the first hit on the armor stand, it will take knockback and no sweep attack occurs. All proceeding attacks onto the armor stand while sprinting will be sweep attacks.
Screenshots/Videos:
[media]Linked issues
Attachments
Comments

Hey!
I can confirm that this issue is still present in 20w49a. It's quite simple to reproduce. Simply sprint and attack a mob and occasionally, you will notice that you'll perform a sweep attack. I've attached a video which shows this bug in action.
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
This is actually a duplicate of MC-69459 and is caused by the said desync.
Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w42a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.