Prime Minister Keir Starmer has said he will battle to keep his job, and sources close to him say he is determined to fight any leadership contest.