Sir Keir Starmer promised to continue championing the causes he took up in public office as he prepares to leave No 10.