I have. Sadly, there's not much we can do. Depending on how old are people, they are susceptible to changes in a matter of few months, especially teens or people on their early 20s, because they are still getting to know themselves and building their adult character traits. Also, there are fake people who just seems like they care and then they don't anymore depending on what's convenient for them at the moment. The important thing is that you know the real ones and stick to them.Also, maybe you'd like to evaluate if that's something that you have been over analysing due to insecurity?
People change. Sometimes we can't really do anything about it :/ I have experienced this too as well with some former friends of mine. One minute they were super awesome and then when something happens, BAM. They leave and makes me feel like i did something wrong. But i guess the best thing to remember is that it isn't our fault.
Constant change should and is a part of human life since it depends a lot on the experiences everyone gets. I guess we can do nothing about it. So when you are aware of that, it makes you rethink and value the awesome people you meet more. All we can do is to learn to appreaciate things and their inpermanence without getting chained to them. I guess people will keep hurting you until you'll finally learn this lesson.