To reproduce, ensure you have multiple recipes unlocked for a given result. /recipe give @p * ought to be enough. Put dandelions in your inventory and locate the yellow dye crafting recipe.
Hold click on the recipe and switch to the sunflower version. It will be red and uncraftable because you do not have a sunflower. The output, two yellow dye, is "red-ed" out. Now click the output anyway. You will obtain one yellow dye, and a single dandelion will be removed from your inventory.
The expected result is probably crafting nothing and clearing the red transparent ingredients, as that's what happens when a normal "ingredient-sufficient" recipe output is clicked.
EDIT: Attached are example screenshots for a different recipe that illustrates the same issue.