David Walliams is a well-known comedian and the author of a series of children's books, but I know him better as the voice of Frog in Room on the Broom. In its day, this book certainly raised eyebrows for its subject matter, but it's quite tame by contemporary standards. Dennis never expresses any interest in being a girl, but simply enjoys dresses. He attempts to pass as a girl mostly as a laugh to see if he can get away with it. Most of the adult characters respond in the same way -- seeing it as simple curiosity without any assumptions about broader gender identity. For more strident works for middle readers on transsexuality, I'd turn to something like Gracefully Grayson.
It's a pleasant book but, like its subject matter, it hasn't aged well. The depiction of a conniving South Asian shopkeeper that is intended to provide comic relief peddles on stereotypes and borders on racism. The ending that tries to tie everything up neatly by normalizing Dennis's desires tries too hard and lasts too long, but the sentiment is appreciated. The numerous sketches from Quentin Blake will delight fans of Roald Dahl.