I have this problem too. A lot at work. But outside of work too. And the fear of being punished or excluded causes anxiety.
This is probably a learnt behaviour for me. There was sometimes no point in saying no and stand up to myself because I was afraid of physical punishment and/or psychological abuse. And sometimes I was hurt in different ways for just being me or existing, which clashed with my sister's not spoken "rules"/likes/dislikes.
It is hard and it is making my work life miserable. I have no cure for it, but I will read the links. I also try to remember the original trauma that the situation reminds me of, I cry over it, and I try to think how I want to behave next time the situation arises.
Last time in therapy I tried something new, that was heartwarming. And I hope it will partly heal this issue. I asked my therapist to play herself as my mother. So I told her stuff my sister used to do to me and she said what she would have done in that situation. We did that for several memories. So that is a suggestion too. It made me feel worth more, created an understanding how wrong it was, made me age psychologically and much more.
Do you know what trauma(s) that might have created this feeling in you?
I wish you the very best.