Speaking as a writer, I find this terrifying. I’ve not read the book in question and I refuse to judge the passages quoted out of context, but this whole thing suggests that we are heading down a road of silencing.
Should writers be allowed to write racist, sexist, homophobic characters in books? Yes. Should we erase any line that has potential for offends? No.
Writing, books, publishing, should be a place where there is freedom of speech. As a society we should be able to listen to someone and collectively respond with ‘that’s not appropriate’ instead of erasing people.
The thing is, when you start to erase and silence, you drive ideas underground. They do not go away, they change and warp, often with resentment.
What are we achieving as a society by removing things we find unfavourable instead of shaping the way we evolve by letting them stand openly, with open backlash/reviews/disagreement if we don’t like them?
There’s a distinct lack of critical thought, ability to exist uncomfortably, and a weird sort of self-prioritising that is only going to result in a world where there is a distinct lack of opposition. Free speech should be protected (which is very different from protecting the content of said speech, and if you’re unable to tell the difference I would suggest your thinking isn’t particularly refined).
Supporting this sort of silencing is going to lead to bad places. We will have sanitised writing with authors too scared to write anything that reflects diversity/contentiousness/bigotry in the world (that exists and should be written about) and authors too scared to approach anything that might readdress some of the issues discussed (E.g. white writer including black characters) for fear of being vilified if they accidentally get it wrong.