They lost because they yielded, and from what information we have that was probably a mistake. The Dominion do not seem to have been capable of maintaining their offensive, the Empire could have held out.
There was always going to be an Ulfric. Ulfric isn't just some random idiot who ruined a workable master plan, he's an unaware pawn of the Thalmor, and if he didn't turn out they'd have found somebody else because they were looking for the excuse to crack down on Talos and stoke civil conflict within the Empire, and there's a lot of people who fought and bled for the Empire who then watched them sign away Hammerfell and their Founder God over to their hated enemy, that's a good recipe for bitterness and resentment that the Thalmor could exploit.
So yeah, I absolutely blame the Empire for letting the Thalmor get that wedge into the treaty, because the Thalmor proceeded to use it to very effectively pry apart their coalition.
My instinct is that if the Thalmor could have kept fighting, they would have. Empire probably can't win, but the Thalmor can't either, so the Empire has potential leverage in the negotiation that they just utterly failed to use.