Child not wanting me

I need a little bit of advice my daughter is 2 and a half and she’s currently wanting to do things with everyone but me if her grandad is with us it’s like she shouts at me to go away and doesn’t want me to even change her nappy it’s always I want grandad. Her dad has Currently started seeing her again and when she goes to see him she shouts at me when its time to go to say she doesnt want to go and for me to go away has anyone else had an issue like this at all im literally getting constantly upset feeling like a bad mom and any advice would be appreciated.