what behaviour do you say no to?
saying "behave" means nothing to a child that age. you need to be clear about what she isn't allowed to do.
Let me give you an example of just how little kids know about what's allowed v. not allowed.
DS1 was 4 when I found him drawing on the dining room wall paper with a crayon. I told him not to do that, but he can draw on paper in there which I gave him.
within half another I saw him drawing on the wall in the hall.
I asked him why he'd do that, I've just told him he can't be drawing on the wall.
he replied: "yes, but you said I can't draw in the dining room!"
bloody hell, the insight of that!!
so he understood the limit I set (ie about dining room) but I said nothing about any other rooms so in his mind they were fair game.
so I explained that ok, I wasn't clear, from now on let's just not draw on any walls at all, ever. he said sorry, he didn't know, we hugged, kissed and it was all fine again.
but it didn't end there as I found him a little bit later halfway up the stairs sobbing his eyes out. between tears he told me he was upset because he tried to be good but "mummy, it's so hard for a little child to know what's right and what's wrong!"
awww, poor boy! I felt so sorry for him, after all how would they know without crystal clear guidance??
so OP try & see it through her eyes, why she's doing what she's doing and what you could do to direct her away from undesirable behaviour by distraction, alternative activities, offering choices etc.
yes, she might just want attention. but chances are she just doesn't know why she has to "behave" or what you mean!