The Prophet ﷺ said, "The one who takes back his gift is like a dog swallowing its own vomit, and we (believers) should not act according to this bad example." (Using translation from Bukhārī 6975)
قَالَ رَسُولُ اللهِ ﷺ الْعَائِدُ فِي هِبَتِهِ كَالْكَلْبِ يَعُودُ فِي قَيْئِهِ لَيْسَ لَنَا مَثَلُ السَّوْءِ