Can confirm this happens with components on 1.20.6. Reproducible with the following command:
/give @p minecraft:netherite_sword[minecraft:attribute_modifiers={modifiers:[{name: "Weapon modifier", amount: 8.0d, slot: "mainhand", type: "minecraft:generic.attack_damage", uuid: [I; -885041709, 1683771192, -1533567981, -1556236849], operation: "add_value"}]}]
Can confirm this happens with components on 1.20.6. Reproducible with the following command: