Keir Starmer locked in eleventh-hour wrangling with departments over how to pay for delayed investment plan