The bottom line is, the Party couldn't win elections under his leadership, so they dumped him. Almost winning is losing. Negative campaigning is part of the process, so if he can't stand up to it or if the public believes one side's negative ads more than the other, you only sound like a fool when you yell, unfair. Blaming the deep state is another sign of idiocy. Each side has stakeholders who to keep some things the way they were or the way they think they should be, and the other sides stakeholders are always called the deep state.
It is sad that you live in the UK and yet have no idea what is going on there.