Keir Starmer made the comments as he pledged his government would publish a long-delayed defence investment plan before next month's Nato summit.