We find in Isaiah 8:2 that Isaiah took two trustworthy witnesses who are Uriah the priest and Zechariah Ben Yeberachiah. If this Zechariah is none other than the prophet Zechariah as Makkos 24b suggests, how could Isaiah take him as a witness if Zechariah lived centuries later during the Persian rule?
According to Rabbi Akiva, in Makkos 24b (as the question cites), Isaiah 8:2 is not literal. The Navi Yeshaya did not get two human beings to sign the document. Rather Hashem was saying to Yeshaya that he (Hashem) will call bring two additional witnesses to what Hashem was telling Yeshaya.
Yeshaya prophesized about the destruction and exile but he also prophesized about the nechama, the eventual return to the Eretz Yisrael and rejuvenation of the Jewish people. Hashem was saying that the future navi Uriah and the future navi Zechariah will testify about the same things--Uriah about the destruction and exile and Zechariah about the nechama.
See Makkos 24b and the Malbim to Isaiah 8:2.
Ibn Ezra writes:
את אוריה הכהן. היה כהן גדול בימים ההם, גם זכריה היה אדם גדול, ודרך הדרש ידועה על נבואת זכריה הנביא ואוריה הנביא:
Uriah was the High Priest, and Zecharia was a prominent citizen. And the well-known Midrash connects these names to the prophets Uriah and Zecharia
I understand this to mean that the Midrash is not saying this is a literal reference to the the later Zecharia, but the Midrash connects the context to his later prophecy.