Recently a change was made to max_stack_size and max_damage components so that they are now mutually exclusive, which takes into account the item's base durability (for example for a wooden pickaxe).
Even if you add the unbreakable component to this item, so it no longer has durability, you can still not add a max_stack_size to it, even though it would make sense if it could.
Attachments
Comments 4
To my knowledge, with simple commands it's currently not possible to remove components; you need to use more advanced methods like loot item functions to get rid of the max_damage component.
I've provided an example data pack:
[media]. Run /loot give @s loot mojira:unbreakable_stackable
to try it out; it'll give you a diamond sword with max stack size 42.
Adding the unbreakable component won't remove max_damage from the item though, if you want a pickaxe with max_stack_size you'd need to remove the max_damage component from the item.