How do I use Item Modifier "Set Damage" with random chance with enchanted bonus?

I don't understand why this isn't working, but it always detects the elytra as unenchanted even when it has unbreaking and gives the full damage amount of an unenchanted elytra. Here is the JSON: { "function": "minecraft:set_damage", "damage": -0.002, "add": true, "conditions": [ { "condition": "minecraft:random_chance_with_enchanted_bonus", "enchantment": "minecraft:unbreaking", "unenchanted_chance": 1, "enchanted_chance": { "type": "minecraft:fraction", "numerator": 1, "denominator": { "type": "minecraft:linear", "base": 2, "per_level_above_first": 1 } } } ] }

What am I doing wrong? I am using version 1.21

Continue to help post