E.B.
This reply only applies if she does not have any hearing impairment, because then she truly would not be listening well, due to any physical cause.
However, if her hearing ability is intact, then I suggest you change your vocabulary. Choose an action word, instead of the word "listen". She's listening, she listened perfectly, but she's not obeying. If you say to her "you didn't listen" that doesn't make any sense, since she listened, she heard, and she did whatever she wanted to anyway.
If you say "you heard what I said and then you made the choice to disobey (or ignore or make the wrong choice), so you will have consequences." Make the consequence fit the crime. Make it very action oriented. For example, "we told you not to chew on that toy. You listened to us, you heard us, and then you made the decision not to obey us, and you chewed on the toy. That toy will be taken away until you can obey". Or, "we told you not to yell in the store. You heard what we said and you would not control your behavior and your voice in the store. We were planning to go to a fun store this weekend but we will not be going now." And make sure you don't ask questions. Don't say "did you listen to me?" or "Why aren't you listening?" State the facts. "You heard what we said and you made the choice to disobey."
And have her repeat what you are saying, along with the consequence. She is testing you, I think, and the word "listen" is a weak word and she seems to know it. Have her repeat "I am not supposed to yell in Target, and if I do, I will lose a privilege". Make sure the consequence is logical. Never say "we're never going in Target again." Choose a painful consequence and then decide to stick with it no matter what.
Is she a good reader? Some kids are visually tuned-in, and respond well to written reminders. You might post a boldly written list of rules for the table where she can see it. Put reminders about where her hands should be and how she should behave at the table on it.