Ran into the same issue as the OP.
I was just unloading junk to sell...I thought, but then noticed I was just giving all my stuff away for free.
I'm not in the game right now but there is a small slider at the top middle of the trading screen where (I think) you can select 'trade only'...of course it was too late for me as I was Bartering my stuff for nothing in return.
The barter system I like...now that I understand how it works.
I just think that if you put stuff up for sale and there isn't anything from the trader you want (no items on the trader's window), then when you hit 'Barter' you get cash instead of bartering your stuff against an empty trade window and the trader getting your stuff for free....or better yet, don't allow a 'Barter' option if you're not selecting anything from the trader to barter for...just make all transactions 'Trade' until you pick something from the vendor you want...then you can either Trade (buy the item) or Barter (put some of you items up for sale to offset the cost).
Hell, even a small tutorial with those popup's that quickly tell you how the system works...the same as when you first go into combat and see those popup's telling you what you can do.
well assuming it's similar to D:OS2, there is a benefit of gifting to the vendor. That benefit being a big discount due to a higher attitude towards you. I didn't notice if this is a thing in BG3 yet, but it could be. if not then the ability to gift stuff to the vendors probably should go.