Exceptions to Diplomatic Immunity
It seems you've found the exceptions to the rule.
Absolute Sovereignty: When the President gets a little too big for their britches.
Act of State: When a country gets a little too 'state'ful for its own good.
Functional Immunity: When the ambassador gets a little too good at their job.