The bug
After right-clicking blocks that can be interacted with, such as doors, buttons, levers, and note blocks, the attack speed will reset and there is no indication made via the attack indicator.
How to reproduce
Get a command block and a wooden sword
Put a button on the command block and put this command into the command block:
summon pig ~ ~1 ~ {Health:4f}
Push the button with wooden sword in hand, and right after pushing it, hit the pig
Notice the pig is not dead and that no attack indicator appeared after pushing the button
As the pig is at 4 health, and wooden swords do 4 damage, the pig should be dead, but it is still alive. Either the button should not reset attack speed, or the attack indicator should reflect the reset.
Confirmed in 1.16.1 and 20w30a. Related to MC-116510 and MC-118740.