I´ve played muscovy, even played Novgorod without allying Poland... Never run into this issue, and has been having wars with multiple fronts, but never had I let one front rip open like that... But really... If you lose that many battles during the war and lose that many forts... I would say the war is lost, even if you manage to peace out...
Hopefully AI logic has been improved too, so that when you manage to peace one out, and thus have gained the upper hand de facto but not in reality, you could prevent the stab hit. But wouldn´t want it to be able just because you´re even sided now, not when you did so poorly in the war...
Perhaps just adjust your tactics a little