Simply: Mending resets breaking blocks.
How to reproduce:
Get yourself a pickaxe
Enchant it with Mending
Damage it a little bit
Spawn a bunch of ores
Mine them
→❌ Animation resets when receiving XP and mending the pickaxe
Clones MC-153892
Linked issues
is duplicated by
relates to
Attachments
Comments
Can confirm in 21w06a

Can confirm in 21w41a.
Relates to MC-2588 since both have the same causes, but I don't think that resetting the breaking animation while using a tool is an expected behavior.
This doesn't only happen with mending. When any data on your pickaxe (or any other item) changes the game will see it as a new item and reset your mining progress. To fix this Mojang would have to implement a check to check if the item w/ the data modification is actually still the "same" item and if it isn't, only then reset mining progress...
Can confirm in 1.18.2 and 22w16b.

Confirmed for 23w43b. I've used the new tick rate feature to video-record the mining progress resetting multiple times for a single block due to XP orbs being picked up:
[media]
This doesn't just affect pickaxes, I just had it affect a hoe in 25w05a. Probably any tool will do it though
Adding this here since I didn't see this when I searched...
Mining with a damaged mending pick can sometimes be interrupted by picking up experience orbs, causing the mining to restart.
The only item with mending is the pick I am using to mine. A video of the issue can be found at https://youtu.be/P3kuJOVuWIk
The issue occurs a couple times, but the most obvious are at 0:23, and the iron block at 0:29.
Let me know if you need to know any other details.
Thanks!