There's no money for anything else. If Ajax is cancelled, it will mean the Army will be short of hundreds of armoured vehicles it claims it needs to be an effective fighting force (according to the Army, they needed bespoke Ajax rather than off-the-shelf). General Dynamics aren't going to refund the money spent just because the UK can't be bothered any more, nor will it cancel a contract that's in its favour for free.
At a minimum, the UK government would need to demonstrate that the vehicles are unusable. Note, unusable, not need to be fixed. GD might pay for rectification works that take years, but they won't accept return of vehicles that they say are working. And indeed, the vehicles are working. They've been on repeated trials, and the UK government made a public statement to say all problems had been fixed. This would mean several years of court battles and appeals, with nothing paid in the interim, and possibly no new Ajax vehicles built either.
It's far more likely the government will double-down and beg GD for a fix. If necessary it will just keep the vehicles in storage, periodically rolling them out for carefully cut propaganda videos.