R Shimon Taub (The Laws of Tzedakah and Maaser, p. 149) writes that
One who benefits by giving tzedakah because he ends up paying less taxes is not obligated to give that profit to tzedakah. Therefore if one would have had to pay $10,000 in taxes had he not given tzedakah, but because of all the tzedakah he gave must pay only $7,000, he is not obliged to give in the profit of $3,000 to tzedakah.
He references Igrot Moshe YD 1:143 that even real benefit coming from tzedakah belongs to the donor and not to tzedakah. As such one would have fulfilled one's obligation even if reimbursed in part.
This is also the conclusion of R Ari Wasserman (in his book Making it work, see p. 14 of the PDF here) quoting the same Igrot Moshe as R Taub above
An interesting point raised in Rav Moshe’s responsum is the deduction of charitable contributions when computing income tax. Certain governments allow a tax deduction for donating money (or even goods) to charities, which lowers the tax bill. Are we required to give maaser based on the higher amount of post-tax net income which results from taking the tax deduction (since we pay less tax as a result of the tax deduction, we are left with a higher net income), or do we compute the maaser based on what would have been a lower amount of net income, assuming no tax deduction? Rav Moshe rules that we need only give the maaser on the lower amount of the posttax net income, and can take the benefit from the tax deduction allowed for charitable donations (Igros Moshe, Yoreh Deah, vol. I, 143).
Note it is best not to make vows (nedarim) to charity lest one forget to honor his commitment and violate a Torah prohibition. Saying bli neder after a pledge is an easy way to accomplish this (see R Avrohom Chaim Feuer's The tzedakah treasury, p. 220)