Whenever I use the command to modify an item, it instead replaces the item. If my item modifier changes the name of the item, it replaces the item with a new item named accordingly. If I try to make a modifier to damage an item, it just gives me a new item without the applied damage.
set_damage
expects a ratio between 0 and 1