Enchantments applied by datapacks using an item modifier don't appear in lore.
I'm using a custom datapack with an item modifier that uses the enchant_with_levels function. When a Mythic Enchant is rolled it fails to add the enchant to the items lore, although the enchantment does take effect. The lore will reappear if the item is renamed in an anvil.