If the reason is something you feel is a misunderstanding you can gently ask them to please reconsider taking it.
If they still refuse that should be the and move on.
For more on healthy boundaries, including gifts, watch online this video by one of my favorite You Tuber's holistic psychotherapist Victoria Lorient-Faibish.
Try to keep all of this in check and accept the item back with grace.
In a calm tone you can also ask why your friend is giving the item back?
Steve Sims of the Bluefish concierge service gives sage advice in Glamour for getting around all this: "Go for experiences, not [physical] items and focus on the message, not the money. When it evokes a great memory, it can't." They suggest renting a dream car for a long day of scenic driving, a boat for fishing, tickets to a game or concert and so on or being extra nonchalant and extending an invitation to something you're already doing.
A charity event or big bash, Salsa lessons, a concert, a lovely restaurant, a picnic in the park, a bistro you're sitting at for hours anyway.
If a true friend catches on to this they might feel compelled to give the gift back to you.