But they did reach agreement, and published it. Unless you’re saying standard contracts grant publishers the right to require writers to revise texts whenever they want them to, this doesn’t apply.
But she wasn't "required to revise texts" was she? That didn't actually happen.
Not sure why you're so wedded to a hypothetical that provably did not actually happen.
But as you ask: as someone who is pretty familiar with publishing contracts, publishers do have control over the content of the book and changes. My current publisher asked me to make a major edit as a result of something that happened in the news, which the publisher feared might influence how readers perceive parts of the book.
It's also not uncommon for contracts to include clauses for things like "don't bring the company into disrepute" and any lawyer worth their salt could make a very good argument in court that Kate Clanchy's repeated lies and attempts to censor and attack her own readers simply for stating an opinion Kate found offensive, brought the publisher into disrepute.
A decent lawyer could certainly make the argument that the racist, ableism and misogynistic language in the book breached the parts of UK law that outlaws "threatening, abusive or insulting words or behaviours that causes, or is likely to cause, another person harassment, alarm or distress [...] language that is deemed to incite racial and religious hatred [and] hatred on the grounds of sexual orientation" and argue that the publisher had a duty to act when informed of the numerous complaints made over that language.