OK using Mr Logics logic which is beyond all laws of this universe:
That's fine so when Labour win the next GE but an investigation discovers Labour ran a dishonest campaign and a complete and utter unicorn manifesto impossible to deliver, the tories manage to reverse the decision and regain power for another term. And we can say, hey that's democracy. What a waste of oxygen and everyones time ever reading this BS.
It wouldn't be democracy, it would be the law relating to elections, doing what it was meant to do.
Now if the law relating to referendums was doing what it was meant to do, i.e. stopping unfair, lying campaigns, it would make the referendum null and void. Buy a. no-one has made any kind of challenge to the referendum lying unicorn manifestos, or b. the Electoral Commission do not think that the illegal practices in the recent referendum warrant declaring the referendum null and void.
I'm sure that if either of the above conditions were met, the courts would consider the cases, and pass judgement. It could go either way, for the illegality of the referendum, (or election in your example), or it could allow the referendum (or election) to stand.
The Electoral Commission may have made their decision possibly because it isn't a binding referendum and MPs can decide based on any unicorn manifestos during the campaign. Whereas, an election is a binding vote on the consistency of Parliament.
Of course,an election consists of many thousands of smaller budgets, organisations, groups, etc. If one constituency overspent, the Electoral Commission has the power to force a re-run in that constituency. It doesn't make the whole election null and void, so your example is not applicable.
It isn't democracy, it's Electoral Commission supervision and law.