Living as the person you are or not doesn’t change Who you are. Whether you act on it or not, what you are is what you are. What you said is true. Not acting on who you are almost always causes significant mental issues.
Many gay and trans people say that they knew they were different at very young ages. What they are had already been determined, but at that point they had no idea as to what it all meant.
Sexual orientation and gender identity are innate. It is also one indicator as to why conversion therapy doesn’t work. You can’t change who you are. All you can do is recognize it and live with it.