Steps to Reproduce:
1. Download and install data pack.
--> See that the datapack contains an advancement that runs a function whenever the recipe "diamond" is unlocked. The function will take the recipe and play a loud noise.
--> See in MC-187398, recipes are now unlocked when crafting them, meaning the advancement will run whenever you use the recipe. (A diamond into a knowledge book)
2. Use the recipe by putting a two diamonds into a stonecutter, and then crafting both into knowledge books, which should play a sound and clear the knowledge book.
--> X Observe that the second diamond does not unlock the recipe, and therefore does not clear the knowledge book or play the loud ghast noise.
This also applies to smithing tables. You can repeat the above process by combining two emeralds with two emeralds in a smithing table, and see the loud noise is (again) not played the second time.
I think this issue is still exist.
Here is how I did in vanilla 1.20.1:
1. Add a recipe "new_recipe:cobblestone" to data pack, it's the recipe that cut the stone to cobblestone using stonecutter.
2. Add a advancement "new_recipe:new_recipe/stonecut_a_stone" and set the trigger to "minecraft:recipe_unlocked", and condition to {"recipe": "new_recipe:cobblestone"}.
3. Stonecut a stone using stonecutter, at the first time, the advancement pop up because of the recipe unlocked.
4. Revoke the advancement "new_recipe:new_recipe/stonecut_a_stone" and stonecut the stone second time, but this time, the advancement didn't pops up.
will, maybe you might think it's normal, because the recipe is already unlocked, but weird thing is, if I did the same thing with furnace and blast furnace recipe, they pop up advancement even the recipe already unlocked.
Therefor, there must one side of them works wrong.
Here is my data pack for this test on github (will, there are also some unrelevent things in it):
Xiang990293/commands-in-server (github.com)