Check whole inventory, including armor slots (1.21.5)
In 1.21.4 this command worked fine: execute in minecraft:overworld as @a[x=0,nbt={Inventory:[{id:"minecraft:elytra"}]}] run function mkbl:elytra_overworld
So anyone that has an elytra in their inventory (in the overworld) will run this command, but now it only works in your hotbar and "default" slots, not in offhand or armor slots... How do I update the command?