The bug
Mining fatigue is ignored when determining the arm animation speed of the player if they have haste as well even though when calculating how long they need to break a block both effects are considered.
How to reproduce
Place for example a log block
Switch to Survival mode and break the log
Place it again
Apply haste and mining fatigue
/effect give @s mining_fatigue 100 0 true /effect give @s haste 100 0 true
Break the log again
→ ❌ It took longer to break the log but your arm animation was faster
Code analysis
Based on 1.12 decompiled using MCP 9.40 PRE 1
The method net.minecraft.entity.EntityLivingBase.getArmSwingAnimationEnd()
ignores mining fatigue if the entity has haste.
Can confirm for MC 1.12.1.