The Prophet ﷺ said: The similitude of the one who takes back what he gifted is like that of a dog which vomits and then it eats vomit. When a donor seeks to take back (his gift), it should be made known and he informed why he sought to take it back. Then whatever he donated should be returned to him. (Using translation from Abū Dāʾūd 3540)
عَنْ رَسُولِ اللهِ ﷺ أَنَّهُ قَالَ مَثَلُ الَّذِي يَسْتَرِدُّ مَا وَهَبَ كَمَثَلِ الْكَلْبِ الَّذِي يَقِيءُ وَيَأْكُلُ قَيْئَهُ فَإِذَا اسْتَرَدَّ الْوَاهِبُ فَلْيُوَقَّفْ فَلْيُعَرَّفْ بِمَا اسْتَرَدَّ ثُمَّ لِيُدْفَعْ إِلَيْهِ مَا وَهَبَ