Daughter doesn’t like me

L

My 2 year old daughter has suddenly decided she doesn’t like me anymore and wants daddy to do everything for her and cries if he leave the room or the house. If I try to cuddle her she will scream and push me away. I’ve read that this is a normal phase but she’s also doing it with strangers whilst we’re out, she will run up to them and hide behind them or cuddle up to their legs then scream crying and run away from me it’s embarrassing! She’s totally fine when it’s just me and her on our own. Has anybody else had this and if so how long did it last? Trying not to let it get me down but it’s really hard 😭