The workspace is all set up and only uses the elements for the trading mechanics.
The procedure does work however when you go to take the golden carrots out of the output slot it rolls them back to the items in the input slot.
This can be avoided however if you shift-click the golden carrots in the output slot which will add it to the player's inventory.
If at that point you click on the golden carrots while the inventory is still open it will also roll it back to the regular carrots in slot 0.
If you close the GUI you then have made a proper trade.
I am not sure if it's just the way the procedure is set up or if in fact its a bug, however if it works properly still I would think that it may be a bug with GUI slots.
something to look into, hope this helps, and I am looking forward to making a tutorial for this system in the future ;)
The villager skin is from 1.14 it looks so odd in 1.12 I did not think that it would look like he's wearing shorts, it's kinda funny. A villager on vacation, bring tourism to Minecraft.