There have always been men and women who play around with gender stereotypes, push boundaries, cross dress, and even live as the opposite sex but how this is viewed by society changes.
Nobody actually believed people WERE the opposite sex by dressing as them. Women who pushed boundaries, dressing as men, were living as a pretence. They were suppressed as women so disguised themselves as men so they could live in a way that would not be allowed as a woman. That could be because they were gay or because they wanted to do work that was men's territory.
Vice versa. Some men dressed as females. There were the mollies in Georgian times and that culture would reflect their society then.
The difference now is that the trans movement tries to apply modern concepts to historical figures retrospectively...like claiming Joan of Arc was trans. There was no concept of trans then. It is a modern concept.
It is also a recent phenomenon to reclaim the word queer and the concept of queer relationships. These are not just homosexual relationships. We have transwomen in relationships with women calling themselves lesbian, when actually this is a heterosexual but yet queer relationship, in the modern sense of the word queer. It seems very recent that we've gone from talking about the gay community to the LGBTQia+ community, too.
So yes, trans people have always existed and no, they haven't, not in the way trans is viewed now.
Gender reflects society, so it's a concept and it will change according to the times you live in.
It's distinct from sexuality