I wish there would have been a deal between Hitler and Stalin, because Stalin was no Lenin, but that didn’t happen
But there was such an agreement: the Molotov-Ribbentrop Pact, aka the German-Soviet Treaty of Nonaggression, the Nazi-Soviet Nonaggression Pact and the Hitler-Stalin Pact. It was signed August 23, 1939.
Hitler violated that pact less than 2 years later when he launched an invasion of the Soviet Union on June 22, 1941. The result was a two-front war for Germany that guaranteed Nazi defeat.