In Russia, Vladimir Putin does not legally have absolute immunity.
China would have been a better example, since the Communist party is above the law and xi did abolish term limits for himself.
In the US, a president could not pardon themselves for state crimes, and the president murdering someone would have been a prosecutable state crime until this decision.