When I dropped a golden sword the Piglin will pick it up as seen in Picture 1, after the Piglin is done staring at the sword and goes to throw out an item at you for the barter. It plays the animation but it doesn't spawn in or give you the reward from the trade. (See video). Also sorry for the bad fps footage.
The fact that they don't give anything for items that aren't gold ingots is intended (see MC-1721188). Though the fact that they play the hand animation like they are is a bug. I recommend having your post reflect that Piglins still play animation for there barter throw despite them not throwing anything.