Yes this has happened to me. Some people do it to dismiss you and it makes them feel better about themselves and think they hold power over you. It's an ugly part of human behavior and many people do it thoughtlessly to your feeling.
One of the few benefits of age is caring much less about what someone thinks of you. Don't allow yourself to be judged by others.
I don't know if there is an effective way to counteract this behavior especially toward loved ones. You can assert yourself by taking the high road and brushing off such criticism. They may stop when they figure out it is not getting to you.