I know from experience that somehow there is a basic hospitality about me, that emanates from me, that causes some men to construe it as interest, and half the time (or more than half) I don't even realize I'm doing it, and yet after the problem ensues, I start questioning whether I should have tried harder not to cause the problem (I hate blaming myself). I also seethe with rage at the fact that no one seems to have ever taught these men that women can look friendly without the slightest intent of something else.
For example (and this is strictly hypothetical, not based on a true story), I could say in front of a man "Gosh darn it I had such a terrible day today" and put my face in my hands, and yet say the same thing in front of another man and that man may interpret it as an invitation to come over and touch me inappropriately. (Well, in reality I'm not going to do this but I'm just exaggerating to prove a point)
Instead of "struggling with" your own personality, you should remove yourself (permanently, if possible) from situations in which men interpret "basic hospitality" as sexual invitation/receptiveness.
I realize you (and probably most women) may not have the luxury of being able to stay away from such environments. I have not always had that luxury.
But for the past couple years, I have worked remotely and lived in an environment that does not encourage men hitting on women. I no longer have to worry about projecting a certain personality to ward off unwanted sexual advances. I can be my natural self, for the most part, without worrying about that kind of thing. If this is something you can achieve, I encourage you to do so.