I try to give myself items with enchantments with levels above the max level, and use other tags like CanDestroy, but if I misspell them, it just ignores it. It should throw an error if I forget to capitalize enchantments in enchantments:[{id:Unbreaking, lvl:4}]
There's no bug here, because the NBT is applied to the item (see /data get); the game doesn't know what's valid NBT or not, only if it can create the item/entity/block.