advancement not working correctly (inventory_changed)

hey, so I started testing some advancements and I made one that you need to get a carrot on a stick but with a nbt: {carrot_on_a_stick:1b} bcs I a few custom items I made and I wanted to add to all of them that nbt so they have something in common, they have aswell a CMD and a custom name. The problem is that when I get the custom items with that nbt ({carrot_on_a_stick:1b}) it doesnt show me the advancement, but when I get a simple carrot on a stick with that nbt, it gives me the advancement. Idk if the game requires that an item have that nbt and it works (which is what I think) or if for it to work it ONLY has to have that nbt and not the custom name and the CMD.
Continue to help post