That requires that Lenin either recants on his "Peace and Freedom, Land and Bread" (somehow subtracting no. 1), or he gets outvoted within the Bolshevik party by defensists.David T’s post does raise an interesting question: what would happen if Kerensky concludes a separate peace with Germany in the summer of 1917 that gives up Lithuania and Poland... and then gets overthrown by the Bolsheviks (anyways) because of it? How does that affect the Russian Civil War?
The latter would be exciting but difficult to achieve because Lenin was the driving force behind "all power to the Soviets". Also, a peace deal without the Kerensky Offensive means not even OTL's JUly Days have occurred. Thus, I'd say the latter is really improbable because in such a scenario, the Bolsheviks would probably denounce Kerensky's betrayal, but they'd be too internally divided and numerically and strategically unprepared to overthrow the PG.
So, the former it is. Lenin eats his own words and forgets about defeatism, probably arguing that he had always advocated a Zimmerwaldian "no annexations, no indemnities" peace, or a peace with the German workers and soldiers not the Kaiser, or whatever. If the Bolsheviks join the ranks of the Defensists, they're actually united with the Mensheviks and most of the Social Revolutionaries (and the Cadets and the ultra-right would agree, too), so basically Kerensky has no chance to stay in power, which is probably one reason why this never came to pass IOTL.
It's most likely that both happens. Dual power is a real thing in the summer of 1917. If the military coup from a right-winger like Kornilov happens first and he thens tries to crack down on strikes, revoke soviet power etc., he's faced with another February, only more widespread this time because the whole country is politicised now. He's probably forced to flee from Petrograd and Moscow within less than two months after takeover, most likely Eastwards. Those who topple him would not be just Bolsheviks, though. It'd be the whole worker-and-soldier phalanx, from Kerensky's post-Narodniki splinter groups over the SRs to both wings of the Social Democrats. They might then quarrel as to whether to restore a PG, call together a Constituent Assembly, or just continue with Soviet power. But that's a different story, and let's not forget that the German Imperial Army is likely to march in when they see that their contract partner has been removed from power and its military forces are abandoning the front line positions. That could provide for some measure of temporary unity.It's just as likely he'd be deposed by the Russian military (Kornilov maybe?) than the Bolsheviks.
While the first - calling off the German offer - is totally in-character for Kerensky and the coalition which backed him, the latter isn't. He doesn't have the grip on power which Lenin had which enabled him to push B-L through within his own support base. Much rather, he just resigns. The coalition which seeks to topple him then pushes into a void. There's really nobody to defend a B-L treaty, and nobody to organise the defense of the heartland which could lay the ground for a better treaty. This is pretty much the German leadership's wet dream. A Soviet coup - although again probably not just by Bolsheviks! - is quite likely, but now they're in a much worse position than OTL's October, with the Germans only a few steps away from kicking in the door to Petrograd.You could have Kerensky's government refusing to agree to any alt-BL peace similarly to how Trotsky did IOTL and then being forced to agree to a harsher peace that emerges after the CP occupies much more Russian territory. Kerensky's government then pulls out of the World War all-together, only managing to retain part of Ukraine and Belarus in the peace agreements as well as being obligated to supply the CP with large quantities of resources as the Austro-German armies in the East are turned West. The lost of so much of Russian territory allows for the Bolsheviks to stir up enough opposition among the Russian people and seize power in Petrograd (and maybe even Moscow) as Kerensky's government is forced to relocate while the Russian Civil War causes the Russian Army to tear itself apart as countless units side with different sides. I don't know how it would play from there -any thoughts and/or recommendations?