Look at black representation - there was a time where they would either be black stereotypes or just be normal characters with black actors but no reference to it in the story. (Eg the token black having a suburban house, with no black friends, surrounded by other white people). Probably, the actor was black but everybody involved in writing and producing the film was white. Or not interested in listening to their black colleagues, or thinking that the film is made "for white people" therefore doesn't need to include any black representation besides having a black actor.
Nowadays we have things like Modern Family, Black-ish, which actually incorporate diversity into the characters without being offensive. Obviously the shows still get criticised, but part of the reason they do better is that there is more diversity in the industry and network's views on what the public want have moved forwards.
Maybe, the same shift will happen for LGBTQ+ characters.