Is she a ewe or a ewe lamb? If a ewe, I’d be wondering why she’s getting this problem, is there something underlying? A lamb is just inexperienced.
And yes, if it’s recurring and the silly thing isn’t getting the message, you may have to keep her in until the grass is drier. Or maybe, if it’s practical, let her out for an hour at a time?