Sounds like a classic case of her trying to gain control of a situation where her Dad isn’t around as much as she’d like, and was before.
All you can literally do is be very patient with her, don’t react to her bad behaviour and overly praise her good behaviour. Always be there when you can for the times she does welcome you.
This is a phase and will pass.
Children certainly need to know they aren’t the boss, and although neither of you want to be apart, she can’t force you into making that happen. That would end up in an even worse behaved child.