When great writers create great characters, the race/gender/sexual orientation of those characters are usually the least interesting things about them. Rather, we are inspired by their courage, their ingenuity, their humour, their relatability, their weaknesses, etc. We connect with them based on feelings and thoughts shared by all human beings.
I totally relate to Mowgli even though his skin is darker than mine. To tell you the truth, I relate to Bagheera and Baloo too! Even though we’re different species! The reason I do is because Kipling writes well, not because of his race/gender/sexual orientation.
The online “line” in writing is between good writing and bad writing.