Weird behavior with attributes

I gave myself a netherite sword that would do exactly 11.5 point of damage. To do that, i used the attribute_moddfiers component {"amount": 3.5, "id": "0","operation": "add_value","type": "generic.attack_damage", "slot": "mainhand"}. Since a netherite sword has 8 attack damage by default, adding 3.5 should give 11.5, right? well not in this case since the sword only does 5. I consulted the wiki but it says it should work fine. Does anybody know why does this happen? Im on 1.21
Continue to help post