while keeping it underfunded
Unfortunately, the problem isn't just the underfunding of the NHS (and the chronic lack of staff due to working conditions and the loss of a lot of the staff of EU origin), it's also the chronic lack of funding of the secondary care systems that are provided by local councils - all of whom have had their budgets slashed massively because of Tory centralisation (which means the local governments get deprived of funds while still having the same responsibilities and costs).
So all the local nursing homes are no longer run by the councils but by for-profit organisations paid for by the council money - which wastes money since the for-profit organisation want to make money and so charge more than the old council did. Even so, they go out of business regularly, dumping old and vulnerable people out. Those people then end up in hospital (along with people who, in the old days, would have gone into a nursing home post-treatment but can't any more because the council can't afford it) taking up beds that are needed for incoming patients - who end up on trolleys in hospitals waiting for a bed.
The problem isn't always the funding for primary care - it's the funding for *all* the bits of the care system, including secondary and tertiary care. So any politician that talks about 'record levels of funding for healthcare' is either lying outright or (at best) disingenuous. A pox on the lot of them.