I don't think that we can attribute it 100% to other people. If we think about it, the way we felt about ourselves at a higher weight compared to a lower one. The way we carried ourselves and the body language we showed. Do you think it was always welcoming? Did I look like the girl who wanted to be talked to? Probably not. I was depressed, and not confident and my self-image in my head was totally not the same as it was when I was smaller. I know for a fact that shows and can be off-putting to some. In no way does that excuse people from being arseholes, disrespectful or rude.
But I always think back to a friend who said when you don't want to be bothered at work "walk fast and look worried." LOL. If that can keep people at bay, I am sure that my depressed, overthinking look will keep people away.