WWI and Russia
In his tour de force conspiracy theory book series Victor Suvorov(a pen name) makes a number of claims about alternative interpretation of the origins of the Soviet Union, Germany and the events which culminated in WWII. He was a Soviet GRU defector. And he used those credentials to claim a certain expertise in geopolitical analysis, as it was practiced in the then-still-existing USSR.
One of his claims was that V.I.Lenin was a German WWI spy and that the October revolution was financed by the Germans to install a government which would be likely to withdraw Russia from the war. The Bolsheviks did withdraw Russia from the war in a peace treaty which was very unfavorable to Russia. But they later re-joined the war, when the Central Powers (Germany, Austria-Hungary, and Turkey) were almost certain to lose, and took back the conceded territory.
After the 2016 election was lost by Hillary Clinton, it was a widely circulated belief that Donald Trump's campaign was directly assisted by the intelligence services of the Russian Federation. There were a number of circumstantial pieces of evidence for that claim, but while some were stronger than others, all had possible alternative interpretations. While this is close to "current events", I don't want to make a claim one way or another about this event. Suffice it to say, that the claim remains controversial with millions of supporters and opponents of its thesis.
The cosmic rise of Putin
Putin's rise to power is somewhat enigmatic. Most of his KGB career was spent in East Germany. When the USSR fell apart, he had to drive back to the USSR from Germany in his own car. He was presumed broke. He even claimed that one of his Stasi friends gave him a 20-year-old washing machine to take home with him.
He left with the rank of lieutenant colonel of the KGB. He became the head of the KGB very quickly. And then, soon after, he became the Prime Minister of Russia (long before he became President). He had no political experience. Russia had no mechanisms for tracking shadow money.
I think a good case can be made that Putin is (or was) a German spy, or at least a double agent. His ties to Stasi go back to the Soviet days. He has made Russia into Germany's gas tank. Putin has provided a golden parachute to the former German Chancellor Gerhard Schroeder, by making him a head of a Russian energy company. As of today, Schroeder still has not left his position despite his entire staff leaving in protest of the Russo-Ukrainian war. Germany remains the main financier of Russia despite the rest of G7 severing economic ties with Russia to prevent further financing of the hostilities.
This is not a widely-circulated conspiracy theory. You can dismiss it as my own, if you want. All I am saying is that there is some evidence for it.
Has there ever been a proven case of a sitting head of state being a foreign spy? And I am not looking for something Biblical or something from the pre-industrial history. I am asking about the mostly-trusted part of history. That means history whose 1st sources are still available to us. If there was such a case, was it proven after the fact or was the head of state removed from power?