The Messenger of Allah ﷺ said, "The one who takes back his charity is like a dog that returns to its vomit and eats it."
أخبرنا محمود بن خالد قال حدثنا عمر عن الأوزاعي قال حدثني محمد بن علي بن حسين قال حدثني سعيد بن المسيب قال حدثني
قال رسول الله ﷺ مثل الذي يرجع في صدقته كمثل الكلب يرجع في قيئه فيأكله
Muslim narrated it in the Book of Gifts, Chapter on the prohibition of taking back a charitable gift after it has been received, etc., no. 1622, from the hadith of Uzai. Bukhari narrated it in the Book of Gifts, Chapter that it is not permissible for anyone to take back his gift or charitable gift, no. 2621, from the hadith of Saeed bin Musayab, through the same chain. It is also found in Al-Kubra, no. 6523.