True, the President’s portfolio is restricted mainly to domestic affairs.
But unlike previous holders of his office Raisi was a legit candidate for next Supreme Leader. He was known to have support of more than a few of the Assembly of Experts, the guys responsible for picking Supreme Leader.