I looked that up because I fell into a discussion at Blindingly White: BookCon, John Green, and Knowing When It's Time to Speak Up, where Brenna Clarke Gray said,
we can’t pretend John Green’s whiteness, his maleness, and his heterosexuality aren’t central to his brand. They’re essential to his brand.That got me curious about what's essential to a "brand" that leads to success in YA. A few people in the comments pointed out that Rowling had used her initials because her publisher thought she would sell better if she didn't write under a gendered name. I noted,
Harry Potter and the Philosopher's Stone was published on 26 June 1997. On 8 July 1997, this appeared in the Guardian: "Debut author and single mother sells children's book for £100,000" So it appears no one tried to hide her identity after the publisher decided to give her a major promotion.