Given the following advancement, placed in world/data/advancements/custom/unbreaking.json:
And the following commands to test it at will:
If an item receives a base durability change of 0, the advancement will trigger. This can be done by casting a fishing rod and reeling it in while the bobber is still in the air. However, if an item receives 1+ durability loss, and that loss is reduced to 0 by the Unbreaking enchantment, the advancement will not trigger.
Using names from MCP1.11+, the ItemStack.attemptDamageItem() method checks first if the incoming durability is 0, performs the Unbreaking enchantment, and returns false if the resulting loss is 0:
Since the trigger is activated after the if statement, it cannot activate if Unbreaking reduces durability to 0.
One solution could be to only activate the trigger if durability loss is 1+ (activating the trigger after the nested if statement), while another solution could be to include 0 durability loss. The first solution may be preferable for consistency since the Unbreakable tag does prevent the trigger from activating altogether, but the second solution could be fun for detecting the player reeling in a rod without catching anything.