Thats the idea of books, films, tv etc. It should be transporting you to another reality. I shouldn't care if the actor is gay and playing a straight character, I shouldn't care if the trans character is trans in real life. Everyones experiences are different and the overriding tone should come from the writers and directors.
I absolutely 100% agree with you here so this next bit is just a genuinely unthought-out random brain I'm about to send out, but what if the actual problem with "modern" audiences is.............."they lack the ability to use their imagination"?
Thinking about this logically, lots of people (but not all obviously) like myself who are 35+ will have grown up "pre-internet", "pre-Playstation", "pre-Mobiles" etc when they were children, so most of their playtime in the formative years (5y/o to 12y/o) needed friends and/or, more importantly an active imagination. Yet lots of today's 20-35y/o have had every electronic distraction available to them for over a decade now, which may potentially mean that they've not had to use their imagination anywhere near as a much, so effectively it may be stunted in comparison to older generations.
This may explain why the current common cry of "unless I see myself represented on the screen I can't enjoy a film/show" etc is so prevalent in younger people because lots (but not all) may lack the imagination required to be able to transport themselves into a character who is nothing like themselves, hence the need to "see themselves" on screen to empathise. So for example, I can watch the 1954 Japanese film "7 Samurai" and can empathise with the cast (good or bad) despite not being a 1500's Japanese Ronin, or I can empathise with Mahershala Ali as his character withstands horrific racism in 1950's USA with remarkable stoicism in the "Green Book" etc, because my imagination allows me to "put myself in someone elses shoes" and the better the writers, director and actors do their job, the easier it is for my imagination to "get" the message they're trying to pass on.
I literally just had that thought so it's probably not thought-out well enough to withstand scrutiny but it seemed plausible.