All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad, sallallaahu`alayhi wa sallam, is His slave and Messenger.
Your Prayer is valid as it does not become invalidated by repeating Tashahhud.
Al-Majmoo’ authored by an-Nawawi reads: “Also, if he repeats the last Tashahhud and sends blessing and peace on the Prophet deliberately, his Prayer does not become invalidated.” [End of quote]
Al-Bahr Ar-Raaiq, a Hanafi book, reads: "If he repeats the Tashuhhud in the last sitting, then he is not required to prostate for forgetfulness. End of quote.
Allah knows best.