U.K. Prime Minister Keir Starmer said he would stay in his post, even as his Labour Party saw heavy losses in local elections.