This is certainly a broader question than any one particular person, but an example I think of is the Roman emperor Hadrian in part because the consensus is pretty solid that he was in fact gay, but even he was still subject to Greco-Roman cultural norms which were different from our own regarding sexuality.
How do historians make the case of whether a person from history was gay, bi, or straight, or are these terms themselves not useful for looking at sexual orientation in the deep past? And how much evidence is needed to make the case one way or the other?
I have a past post on this - specifically with reference to the 18th/19th century phenomenon of "romantic friendships" - that I'll quote below:
Romantic friendship is one of those topics that comes up here from time to time. Basically, "romantic friendship" is the term used by scholars and in the eighteenth and nineteenth centuries for very intimate friendships (usually but not solely between two people of the same gender, and usually but not solely two women) that were characterized by very tender language, professions of love and devotion, and sometimes even co-habitation. People tend to fall into two camps over them:
One camp says: the way we express friendship today is not the objective and only way to express friendship. People during this period genuinely believed that close friendships should border on romance, and that it was admirable for two women to be so attached to each other that they cried when they parted and wrote letters about how they're counting the hours until they meet again, etc. It was completely possible for these to have been romantic but not actually romances in the sense of the word today.
The other camp says: these were most likely actual romances. If we saw a letter from a man to a woman in 1847 that stated
... the swelling within me of my love for you, the pride I have in you, the majestic reflection I see in you of the passions and affections that make up our mystery, throw me into a strange kind of transport that has no expression but in a mute sense of an attachment which in truth and fervency is worthy of its subject.
(as Charles Dickens wrote to William Macready on November 23 of that year), we would generally assume there to have been a relationship with a sexual component, so it is inconsistent to treat relationships between two men or two women differently. Sexualities other than heterosexuality existed in the past but have gone unnoticed except when the people with them were charged with criminal offenses for acting on them, which also tends to bias the record toward men who were attracted to men. Just because outsiders to these relationships catalogued them as friendship doesn't mean that we have to be similarly ignorant.
I tend to fall between the two camps myself. While I personally incline more to the second - when I read a letter between two participants in a Boston marriage (two women living together for decades, supposedly just banding together as two spinsters) the romantic love just leaps off the page - it seems unlikely to me that every single romantic friendship was actually a romance that other members of society simply didn't pick up on, especially given the criminalization and extreme disapproval of same-sex romance and sex. Georgians and Victorians weren't total innocents! It's not as though it would have never occurred to anyone that two male friends who lived together and made grand gestures toward each other might have The Wrong Kind of Friendship. Plus, I have to admit that modern day buddy movies often end up showing the same kind of thing in their bromances.
My conclusion? That we should be open-minded about both the possibility of erotic romance in historical situations where we can't 100% know what happened, but that we should also remember the hundred other ways that people in the past weren't just "us but in costumes".
Ultimately, there's no real way to prove anything about historical figures' sexuality, or modern figures' sexuality, for that matter. Sexuality is far too complex to be objectively determined (the way you could prove that a person had been in a certain place at a certain date); the same "proof" can be interpreted in multiple ways. Was this unmarried historical figure single because they were gay and opposite-sex repulsed? Were they asexual? Were they heterosexual and just never found anyone they liked enough to marry? Was this historical figure straight because they were married? Were they forcing themselves into the marriage because of compulsory heterosexuality? Were they actually bisexual/pansexual? (Options that are VERY RARELY considered when the general public speculates on historical figures' sexuality, for some reason.) This is why modern historians typically don't try to make cases about anyone's innate sexuality.
And yes, as you suggest, we have to ask how useful these terms even are - I think these days you're more likely to see people who seriously study and discuss these issues use terms like "same-sex attracted", which describe the feelings without suggesting that the figures fit into modern paradigms and communities. For instance, in some historical cultures it could be accepted for men to find other men attractive, but not accepted for them to act on it except in specific ways (with younger men, with slaves, topping, etc.), which is obviously highly alien to modern western views. How much would a high-status Athenian man who impregnated his wife and also slept with men he enslaved relate to the modern LGBTQ community?
In short: we don't.
It's impossible to categorize historical people by terms and identities that didn't exist in their times and cultures, and I would argue it's also unethical to attempt to do so. As an example, 'outing' someone who is alive today is generally considered intrusive and disrespectful (at the very least) - it's an attempt to classify someone from the outside, regardless of their wishes and privacy. Essentially, attempting to do so in retrospect to - using your example - Hadrian, is a similar exercise. He was not explicit about the things we are curious about, such as the specific details of his relationship with Antinous, etc, so we cannot fill in those blanks for him. He also was not, and could not have been, explicit about the terminology we use today because that didn't exist for him - there was no concept of homosexuality for the Romans, but rather sexual power dynamics were classified by the active or passive partner. That kind of thing might be gossiped about (and indeed, it was about some powerful historical figures, such as Julius Caesar, who may have had an 'improper' relations with King Nicomedes of Bithynia (Suetonius, Caesar, 2) or Sulla, who Plutarch mentions as having had a male lover (Plutarch, Sulla, 2.2) among others), but never confirmed in sources we can rely upon (and probably never confirmed to anyone at the time, either, as this wasn't the kind of thing people were public about).
What we can and should do is contextualize the historical people we read about and study. Going back to Hadrian; even though he never confirmed 'Antinous is the love of my life and my boyfriend', we can look at his actions. He kept Antinous with him for years, commemorated their activities together in public art in Rome (this image is now on the Arch of Constantine, spoliated from a Hadrianic period monument, but the boar hunt image shows Hadrian on horseback and Antinous to the top left), went into deep mourning upon Antinous' death in Egypt, had him deified, founded a city named for him - Antinoöpolis, minted coins with his face on them, had statues made of him - the list goes on. His devotion to Antinous is clear. What isn't clear is how Hadrian specifically thought of their connection, so it's important to let the material record speak for itself and not force the historical record to match modern ways of thinking.
To answer your question more broadly, I believe we should be contextual about the 'close friends' trope. What historical period are we talking about? What strictures were there upon people in terms of gender roles, societal expectations, etc? What evidence survives - writings, images, etc - that can show us the nuances of a situation that go beyond what social expectations and social standing allowed? And then, let those people speak for themselves as much as is possible - but, again, to never impose our views upon them.