As I mentioned, we are (at least in the modern world) past sexism and racism within religion, so not sure why you are using those as examples.
The reason I'm saying it isn't discrimination in regards to homosexuality is, most theists do not have an understanding of homosexuality (what it is and what causes it is not certain for me included, not just theists), so as the understanding grows, it will filter the homophobia out of the religion (hopefully). But forcing them while they grew up indoctrinated and thinking it is wrong doesn't seem fair. A lot of people take their religion seriously.
The reason I'm saying it isn't discrimination in regards to homosexuality is, most theists do not have an understanding of homosexuality (what it is and what causes it is not certain for me included, not just theists), so as the understanding grows, it will filter the homophobia out of the religion (hopefully). But forcing them while they grew up indoctrinated and thinking it is wrong doesn't seem fair. A lot of people take their religion seriously.