You really need the support of your wife here.
When your daughter refuses your attention and goes to her mum, your wife needs to refuse her and insist she goes to you.
Was there a period in her life where you weren’t around so much, maybe worked long hours away?
You just need to spend considerable time around her, so she understands you’re not going anywhere. This sounds like a classic case of your daughter rejecting you, because she feels rejected by you at some stage.