custom arrows not stacking

I am making a datapack that adds more arrows into the game, but I have come across an issue where an arrow will not stack with the same arrow after being fired from a bow despite having the same nbt. This is the NBT of the original arrow: {Slot: 1b, id: "minecraft:tipped_arrow", Count: 7b, tag: {custom_potion_effects: [{duration: 2, show_icon: 0b, amplifier: 3b, ambient: 0b, id: "minecraft:hero_of_the_village", show_particles: 0b}, {duration: 2, show_icon: 0b, amplifier: 2b, ambient: 0b, id: "minecraft:unluck", show_particles: 0b}, {duration: 2, show_icon: 0b, amplifier: 13b, ambient: 0b, id: "minecraft:luck", show_particles: 0b}], CustomPotionColor: -1, CustomModelData: 131223, HideFlags: 32, fletching: 3b, display: {Lore: ['{"text":"Tip: Cod"}', '{"text":"Shaft: Blaze Rod"}', '{"text":"Fletching: String"}'], Name: '{"text": "Fish Arrow"}'}, tip: 13b, shaft: 2b}}

And this is the NBT of the shot arrow: {Slot: 2b, id: "minecraft:tipped_arrow", Count: 1b, tag: {custom_potion_effects: [{duration: 2, show_icon: 0b, amplifier: 3b, ambient: 0b, id: "minecraft:hero_of_the_village", show_particles: 0b}, {duration: 2, show_icon: 0b, amplifier: 13b, ambient: 0b, id: "minecraft:luck", show_particles: 0b}, {duration: 2, show_icon: 0b, amplifier: 2b, ambient: 0b, id: "minecraft:unluck", show_particles: 0b}], CustomPotionColor: -1, CustomModelData: 131223, HideFlags: 32, fletching: 3b, display: {Lore: ['{"text":"Tip: Cod"}', '{"text":"Shaft: Blaze Rod"}', '{"text":"Fletching: String"}'], Name: '{"text": "Fish Arrow"}'}, tip: 13b, shaft: 2b}}

The NBT on each one is the same except for the order of custom effects which seems to be random anyways depeding on the other nbt of the item when it is made.

Can anyone help or explain why this happens?

Continue to help post