I agree that she's seeking attention and comfort. I have a four yr old and seven yr old ( and a bub) and they have gone through periods of behaviour like this, and it's generally been when things have been difficult at home or there have been some changes etc...
I know it's maddening and you want them to get over it, but they aren't adults - I'm a grown up and I carry on like a pork chop from time to time, so I don't expect my kids to be able to process all their emotions "properly".
Have you spoken to her about it during the day? Perhaps ask why she's doing it and look at finding a solution together. Maybe a sticker chart could help.