I have always thought that most people just want interesting and compelling characters. I don't believe Horizon would have sold differently to any significant degree if the lead was male but, all other things being equal, if they weren't as cool as Aloy, or portrayed as well as Ashly Burch's performance, then it could definitely have sold worse.
I know some people scoff at "generic" white male characters but there are plenty of great ones and not all white male characters are remotely the same beyond those two attributes. Likewise Aloy isn't just a woman, Lee Everett isn't just black, Ellie isn't just gay and Senua isn't just someone with a mental disorder. That is not to say this representation isn't important because it absolutely is but more than that they are interesting, relatable characters that lots of people love. The thing publishers should take from any of these characters being popular and their games selling well is that if you put the care and effort into creating unique and compelling characters then it will likely pay off.
Aside from the risk-averse publisher aspect I don't believe we'll ever truly get a reasonable level of representation until that is reflected on development teams. You don't have to be a woman to create a female character and you don't have to be black to write a black character but people are going to naturally gravitate to what they know and to create the best minority characters you're probably going to need direct input from people of a similar background. It appears from the outside the trends are going in the right direction but the majority of senior staff of development studios still seem to be white males, presumably straight too.