Currently you can create advancement predicates that trigger when you enchant an item with a specific enchantment, but these only work when you do it via the enchanting table.
If you do the same thing by combining it with a enchanted book in the anvil, it's possible to get the enchant without unlocking the corresponding advancement.
I believe both actions should trigger the same predicate as they both serve the same purpose, mechanics-wise.
Thank you for your report!
However, this issue is Invalid.
You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The Minecraft Feedback Site or visit the Minecraft Feedback Discord server.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki