It's really normal for things to be all over the place - your child seems to be doing really well at once thing, but regresses in another, various steps are taken backwards, forwards, sideways and diagonal all the time, and at a pretty uneven pace. I think for pretty much all families and children, progress is not a linear thing, but a bit of a jumble. That's very very normal. That's definitely how it's been for all my kids.
I would definitely not ever be upset with or 'punish' my child for honestly telling me (or indeed shouting) they didn't want me there - again, that's very normal and I wouldn't expect them to want me at this stage. It is upsetting for us, of course it is, when we are pushed away, but it's common to not want parents. Your DD seems old enough to be talking through 'indoor voices' and talking rather than shouting. If she has just had a nightmare, then I wouldn't expect her to think about talking vs shouting though. If she's stressed and frightened by her nightmare, she won't be able to think things through, and I don't think there's anything wrong with a stressed and anxious child who has just had a nightmare shouting at her mum. (But I know how stressful and upsetting it can be, because I have a child prone to nightmares and sleep issues). Again, if she's got into an argument, that will have been stressful and she's not likely to be able to think things through properly at this point.
At this stage I think this is very normal. I understand how deflating it might feel, but you aren't doing anything wrong and it isn't anything to do with your parenting. Being there and offering the help, even if she refuses it now, is very important in helping her to come to find that she can rely on you. As she is with you for longer, she's likely to want you more and more.