This bug was encountered on a realm so I am unsure if it affects single player worlds. Attempted bartering with piglins by dropping gold ingots but they were not interested, the only way to barter was to directly interact with them. This was tested on all difficulties.
Do you have the "Mob Griefing" game rule enabled?