On it being disliked for a man to take back his gift whether he has handed it over to the other person or not, and on the gift given to his son, whether it has been handed over or not. On it being disliked to purchase something which he had given as sadaqa, paid as zakat or in expiation from the one to whom he gave it, but there is no objection to him buying it from a third party

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

285. Chapter: On it being disliked for a man to take back his gift whether he has handed it over to the other person or not, and on the gift given to his son, whether it has been handed over or not. On it being disliked to purchase something which he had given as sadaqa, paid as zakat or in expiation from the one to whom he gave it, but there is no objection to him buying it from a third party

1612. Ibn 'Abbas reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "Someone who takes back a gift is like a dog returning to its own vomit." [Agreed upon]

1613. 'Umar ibn al-Khattab said, "I gave away (a mount) a horse in the way of Allah and the person who had it did not look after it properly. I wanted to buy it back and thought that he would sell it cheaply. I asked the Prophet, may Allah bless him and grant him peace, and he said, 'Do not buy it nor take back your sadaqa even if he were to give it to you for a dirham. The one who takes back his sadaqa is like the one who swallows his own vomit.'" [Agreed upon]