Characters like Rosalind and Viola aren’t real people, they’re made out of words. So there isn’t any final truth about why they ‘really’ dressed as boys. There are interpretations, and I don’t think it would be difficult to build a trans one if you wanted to.
OK. Say you're queering Shakespeare and you want to do a retelling in which Rosalind dresses as a boy because she identifies as one.
In Shakespeare's time, of course, Rosalind would have been played by a boy, who looked feminine enough to play a girl, but would at some point be on the stage as a boy dressed as a boy playing a girl dressed as a boy. But the audience is used to an all male cast so they make do.
Today, we have the freedom to cast both sexes into theatrical roles.
So, in our imagined retelling where Rosalind is a trans boy, who are you going to cast?
A man? No. Because he'd look like a man in women's clothes and then a man in men's clothes, and so he'd be disguised as the opposite sex for the scenes where Rosalind is supposed to be presenting as herself, and presenting normally for the scenes where she is supposed to be disguised as the opposite sex. The plot device fails.
A trans woman? No, for the same reasons.
A woman? Yes, but how are you going to retell the story in a way that recasts her as a trans man? Are you going to rewrite chunks of the Shakespeare? Or do away with the Shakespeare altogether, changing both the poetry and the plot? In which case, how far can you push it before it's not Shakespeare anymore?
A trans man? Yes, but if he's got a deep voice or male pattern baldness due to testosterone he won't be convincing as pre-transition Rosalind. And the same questions apply about the script.
Ultimately, if you want to reinvent Rosalind as a trans man you'd still have to cast a female actor in the role, otherwise it wouldn't work. And I kind of think that in reinventing her as a trans man you are really just reinforcing the idea that a trans man, like Rosalind, is a girl pretending to be a boy.