Better Than Mending
It's just a simple QoL add-on which is mend an item by holding it then hold sneak for 2 seconds, automatically repair & consumes the player's XP
Screenshots

Description
Better Than Mending
So basically it's just a simple QoL add-on, which can be useful, same as the mod in java with the same name by legobmw99
How it works
At least the item you want to repair has a mending enchantment
Some important things
This addon is inspired by [ Better Than Mending ] @legobmw99
Minimum Minecraft version 26.30
I don't guarantee whether this addon will work on server or in realms, some of my addons have the same issue
This addon is achievement free
How to use it
Hold any item you want to repair, that has at least the Mending enchantment
Hold sneak for 2 seconds to run its mending function
Wait until the mending process is complete
This process requires at least some XP
Join the gng
Images
Changelog
Changelog 1.0.4
Now comes with pack settings, with configuration of actionbar type, repair method, and toggle of its mend function
Update explanation
Sneak Only Mode, is the old mode, which only relies on sneaking.
Meanwhile, Sneak + Interact mode is the newest mode, to run it's function you have to click and hold the sneak and interact buttons for 2 seconds (no need to click simultaneously)
I hope this update has fixed the issue you were experiencing.