How is Ahmadinejad still alive?

After looking into the guys post presidential political activities he's said stuff that would normally get you killed every time the Guardian Council doesn't let him run. For instance:

During the 2017 protests he criticizes the government as well as the supreme leader himself.

After the Bloody Aban (2019) protests Ahmadinejad openly criticized not only the president but also the supreme leader.

In the 2021 elections after being rejected he again starts criticizing the Islamic Regime.

During the Russian invasion of Ukraine he openly supported Ukraine going against the regimes pro Russia stance (granted most of this happened on Twitter so his pro Ukraine stance could just be a psyop.)

He continues this song and dance during the 2024 elections and this time he refuses to vote. His refusal goes against Khameneis decree that not voting is Haram.

Granted there was the July 2024 attempt on his life (for which the IRGC is the number one suspect) but this is the Islamic Regime we are talking about. There aren't any pesky laws that require the regime to keep his death hush hush. If Khamenei wanted to he could sign Ahmadinejads death warrant without a real trial and have him hung within days. So why does Khamenei just let him criticize the regime? Is Ahmadinejad his secret nephew or something?