I came across a picture of the Deputy Mayor of Leipzig having committed suicide at the end of World War II (easily found, for those interested in the NSFW). I am sure many cities had mayors or other officials who ended up either committing suicide or being arrested by the Allies, not to mention those who died as the war closed in on Germany, but there must have been plenty of cities and towns whose leaders survived the war.
What happened in those cases? Were there local leaders who remained in place during the post-war period? How did de-Nazification work and where was the line?
While I do not have details on specific circumstances where an official survived in his post, I do have some detail about Germany more broadly and about the Allied attempts at De-Nazification. In essence, this post is going to focus on the official attempts to mete out justice, as opposed to any vigilante efforts. Hopefully there is someone watching this sub that has some more details for you, but this is an overview.
The allied powers, fairly quickly after victory in 1945, did arrest a swathe of Nazi leaders and burecrats. The major players in the Nazi party who were still alive (22 of them to be exact) were promptly tried at the Nuremburg military tribunal, which started in November of 1945. The Nuremburg trials received a fair bit of criticism, by the way, by legal scholars and some Germans as well, of being a sort of Victor's Justice. The Soviet Union had a reputation for brutal methods, and France's colonies were the recipient of some very harsh treatment, but it was only Germany who was being tried.
In the next several years there were another 5,000 or so trials, of which 4,000 were sentenced. There were also two hundred thousand detainees who had held various positions of authority that were interned as the war ended. However, of both those sentenced and those simply arrested and held, most were later set free by the newly formed Federal Republic in 1949-1950, if not earlier by occupying militaries. From my understanding, most of those who had directly interacted with the Holocaust in a meaningful way were left in prison, but most others were released. In relation to your question about consequences for Nazi bureaucrats, most of these detainees were Nazis of authority of varying levels, so that should give you a better idea of the immediate postwar period.
However as that paragraph mentions, most of those arrested were later freed either by the occupying powers or the Federal Republic. Here is the crux of De-Nazification. Many people know that scientists were spared from prosecution in a variety of cases, because of their value to either Western or Soviet military projects. This happened with burecrats as well, for various reasons. Germany in 1945 had been left "bankrupt and starving in a pile of rubble" and the military administrators of the 4 occupation zones needed to rebuild Germany's infrastructure and bureaucracy to at least a self-sustaining level. But every burecrat in the nation had been affiliated with the Nazi party to some degree or another. There were, in short, no anti-facists left alive in Germany, because most people still in power had kissed the ring. Burecrats were quickly released from detention and returned to positions of authority to help direct reconstruction efforts. Ironically to me, France was the most lenient about ex-Nazis in authority, despite their occupation during WWII. However, especially after 1947, tensions with the USSR led to Britain and the US also lowering standards to get Germany up and running again.
While the US and Britain did take time to give up on De-Nazification, the USSR had always had a lenient approach to ex-Nazis. These burecrats were accustomed to totalitarian regimes and transitioned quite effectively, and there was no outside scrutiny by media or other observers to cause the USSR to think twice about using them.
The final nail in the coffin of De-Nazification, is, in my mind, the amnesty granted by the newly formed Federal Republic of Germany. By 1949, most of the war crimes trials had wound down, though they would rise again periodically as new investigations revealed the extent of various Nazi crimes. Germany as a whole was focused on looking forward, and in some ways tried forgetting the past. As such, many prison sentences were commuted, and many people who had been banned from one profession or another were allowed to return. This new Germany needed skilled administrators to help handle reconstruction, and the country also needed to make new allies globally. To handle both of those goals, the nation decided to quickly move past their Nazi history. Germany's relationship to it's past became more complicated as time went on. These complications, however, did not necessarily impact the burecrats with Nazi credentials.
I would highly recommend Konrad Jarausch and Michael Geyer's "Shattered Past: Reconstructing German Histories" if you want to know more about Germany's troubled relationship with the past, and the question of national memory. Its a relatively new field of historical research, and one I find fascinating. A majority of this post is from Martin Kitchen's "A History of Modern Germany."