The question is - are you gauging an actor’s effeminacy or masculinity from a performance? That might not give you an accurate picture of what they can do in other parts. ‘Jack’ from ‘Will and Grace’ was a character that an actor was asked to play in a certain way. Could he play a Kung Fu action hero? I’ve no idea, which is why I’d ask him to read for the part of Jackie Chan’s top student turned nemesis… Could he play Billy the Kid? I don’t know, make him audition… What about Gen. George Patton? I can’t imagine it, but what if he did a fantastic audition? Would you give it to him?
It’s the thing about acting - a good actor can play someone completely different from themselves. A great actor can play someone completely different from themselves so convincingly that you barely recognize them in a different part. I’m thinking particularly of Ben Kingsley in ‘Gandhi’ and ‘Sexy Beast’, but there are lots of other examples. Who would have thought seeing Hugh Laurie in ‘Blackadder’ and ‘Jeeves and Wooster’ that he could play an acerbic, American genius Doctor?
It’s how people get typecast - one does too well in a part, and producers and directors seem to lose the ability to imagine that actor in anything else.
And it’s equally frustrating to see an actor given roles that are beyond what they can stretch into - I’m thinking specifically of Keanu Reeves here. Bill and Ted - great. The Matrix - good. Much Ado about Nothing - I wasn’t convinced.
Yeah, unless Sean Hayes is a very limited performer then he should be able to do something other than just reprise “Jack” again and again. I don’t know what the extent of his acting abilities might be, but I don’t see any reason to assume he can’t play anything other than flamboyant gay men just because of his most famous role.
I note that when the OP described other situations where an actor might be wrong for a role, he used examples where the actor would have the wrong look. If an actor is obviously the wrong size, age, or race for a particular character then this will usually (although not always) make it seem ridiculous to have them in the role. But although people can be described as “looking gay”, this normally refers to hair and clothing styles or body language. The former are under the control of the hair stylists and costumers for the production, and the latter should be under the control of any competent actor. I don’t see anything particularly feminine about Sean Hayes’s facial features (here’s a recent photo from the IMDb). Although I wouldn’t describe him as a really “macho” looking guy his face strikes me as at least as conventionally masculine as plenty of other famous actors who’ve played straight leading man roles.