An apparent gender change is something difficult for others to understand, and if / because they don't understand, they might think you are perverted or something like that, especially if the transition is sort of like "all right, I'm going to now live as a woman, there's nothing wrong with that" without much explanation. So that's why people might stay away from you.
I would (and did) pull aside a few of those distancing themselves from me whose relationship I value; "people who I thought were my friends", and try to have a heart-to-heart talk with them:
"Would you have a little time to talk? I have been feeling a bit sad lately because I feel you seem to be avoiding me, even though we're friends. Is it because of my transition?"
And then ask them to tell me how they truly feel, stressing that I care about how they feel as well, and try to ameliorate those concerns.
Of course, it may not work at all (depending partly on them of course but also partly on your patience and skill in speaking and explaining!)...
But even if it does work, this will not result in an immediate "oh I understand now, I'm not scared of you any more" from them, and will take a few more conversations for them to gradually understand, and it can be a lot of work...
But for me, if a friend is important to me at heart, then it will be all worth it, because I like them and I don't want to lose them...
I can't do that with everyone, though, of course, but even keeping a few extra friends is a great thing!
*shrug* Just a different way of looking at it than just "if they can't accept me that's their problem"...