Doesn't one hold that Mahdi is a Successor/Caliph of Muhammad as per the following verses?:
[
24:56] وَعَدَ اللّٰہُ الَّذِیۡنَ اٰمَنُوۡا مِنۡکُمۡ وَ عَمِلُوا الصّٰلِحٰتِ لَیَسۡتَخۡلِفَنَّہُمۡ فِی الۡاَرۡضِ کَمَا اسۡتَخۡلَفَ الَّذِیۡنَ مِنۡ قَبۡلِہِمۡ ۪ وَ لَیُمَکِّنَنَّ لَہُمۡ دِیۡنَہُمُ الَّذِی ارۡتَضٰی لَہُمۡ وَ لَیُبَدِّلَنَّہُمۡ مِّنۡۢ بَعۡدِ خَوۡفِہِمۡ اَمۡنًا ؕ یَعۡبُدُوۡنَنِیۡ لَا یُشۡرِکُوۡنَ بِیۡ شَیۡئًا ؕ وَ مَنۡ کَفَرَ بَعۡدَ ذٰلِکَ فَاُولٰٓئِکَ ہُمُ الۡفٰسِقُوۡنَ ﴿۵۶﴾
Allah has promised to those among you who believe and do good works that He will surely make them Successors in the earth, as He made Successors
from among those who were before them; and that He will surely establish for them their religion which He has chosen for them; and that He will surely give them in exchange security
and peace after their fear: They will worship Me,
and they will not associate anything with Me. Then whoso is ungrateful after that, they will be the rebellious.
[
24:57] وَ اَقِیۡمُوا الصَّلٰوۃَ وَ اٰتُوا الزَّکٰوۃَ وَ اَطِیۡعُوا الرَّسُوۡلَ لَعَلَّکُمۡ تُرۡحَمُوۡنَ ﴿۵۷﴾
And observe Prayer and give the Zakat and obey the Messenger, that you may be shown mercy.
The Holy Quran - Chapter: 24: An-Nur
Regards