Umar bin Khattab once gave a horse to be used in the path of Allah, but later he found it being offered for sale. He asked the Prophet ﷺ whether he could buy it back, and the Prophet ﷺ said, "Do not take back what you have given in charity."
حدثنا عبد الأعلى عن معمر عن الزهري
أن عمر بن الخطاب حمل على فرس في سبيل الله فوجدها تباع فسأل النبي ﷺ عن شرائها فقال النبي ﷺ لا تعد في صدقتك
Its isnad is sahih. It was narrated by the compilers of the six books, as in al-Muntaqa 2076, and see what has already passed in Musnad Umar 166, 258, 281, and in Musnad Zubayr 1410.