Although things were rapidly drawing to a close, the end of WWII in Europe had a misunderstanding that effected how it went down.
Hermann Göring sent a poorly worded telegram to Hitler in the bunker on April 23, 1945 outlining a plan for when Göring might take over the Reich.
Due to poor communication at the time, the telegram was cut down from its original longer version.
The edited version was used by Göring’s enemies (esp. Bormann) to suggest Göring was effectively starting a coup.
Go Göring went from Hitler’s long time number 2 and successor to stripped of all positions and very nearly executed.
After Hitler’s suicide Goebbels became the successor, but that was brief and then Dönitz became the head of the German state.
The generals in Berlin wanted to capitulate the capital to the Russians fairly quickly, but they had to continue on until Goebbels took himself out.
Similarly, Dönitz kept the war going longer than needed for various reasons. Including, but not only, getting as many troops west to surrender to the Western Allies.
Lastly, the Allies considered Dönitz as …, well nothing after the military surrender. The result being was that the Allies took over completely all government command in Germany. This created an awkward situation as the pre-prepared civil surrender document had no one to officially sign for the Germans. So in June they just issued a declaration saying they were in charge. Which was diplomatically suspect and had long term consequences.
No peace treaty was possible until 1990.
OTOH, if Göring’s telegram was understood correctly, after Hitler’s death it may have been the case that the war would have ended a bit sooner. But the real issue is what would the Allies do with Göring’s government? Would he have been allowed to name a non-Nazi successor government? That this government would then negotiate further with the Allies? That a single government would have continued under Allied supervision? Etc. (Cf. Austria, Italy, Japan.)