The boundaries exist; whether writers should obey them is another matter.
Once a book is published, it is out of the writer’s control. All it takes is for one person to object to a book for no one in that school, or library, to be given access to it. What a writer can control are the words they put on the paper and it is our job to tell the story, not second-guess the audience – or the adults who police the audience. If we observe the rules of what we “shouldn’t” write about, then we are not preventing the students in a single school from reading our truth, we are preventing every reader in the world from reading it.