Prime Minister Sir Keir Starmer said he would not walk away from his job but even allies conceded the results had been ‘brutal’ for Labour.