I've mentioned this before in this thread, but I don't think an active openly gay player would lose endorsements, especially if they're a top player. They would most likely get even more attention and endorsements. Most major companies today participate and sponsor events during pride month, and no company wants the negative publicity of openly discriminating against a player based on their sexuality. They all want that LGBT+ money and diversity points.
As far as homophobia, I'm sure there will be homophobic players, but there are also players like FAA, Medvedev, Tsitsipas, Federer and Taylor Fritz who have publicly stated that they would welcome and have no issues with an openly gay player. I also doubt that the ATP would tolerate blatant homophobia directed at a gay player, and would take some sort of action against homophobic players. It definitely would have been harder to come out in the past, but I don't believe it would be as bad as people think it would be today.