Yes! Precisely! That's why all those drag queens used to do Dorothy. That's why (mostly) Judy Garland being a gay icon and diva extraordinaire.
Queer people saw that switch to color and collectively gasped, "That's us! That's us when we dare to live as who we are!"
Did you know we used to call ourselves "friends of Dorothy?" That was before my time, but when my late husband Lenny was young, that phrase was a secret code word. "Are you a friend of Dorothy?" meant nothing to the uninitiated, but for those in on it, it meant, "Are you one of us?" or in the right circumstance, "Wanna come up and see me some time?" (Yeah, I know. Wrong diva. Sorry, Mae 😂)
As you point out, Baum almost certainly (okay, certainly) did not intend The Wizard of Oz as queer allegory, but art exists in a mythical space between the artist and the art lover.
For queer people, Oz and Dorothy have had very special meaning since almost the moment MGM released the film. So special that Judy Garland herself was in on it. And her daughter Liza, eventually.
So special that Gregory McGuire penned Wicked (later adapted as a Broadway musical) as a knowing wink to the perceived queer subtext. He made it a lot more explicit even as he treated the "wicked" witch with sympathy.
But ... art means what we perceive it to mean. So if you take spiritual meaning from Oz because of Baum's interest in theosophy, then your perception of meaning is as valid as anyone's.
Your "friend of Dorothy" gets to be whoever you please. 🌈