When mine do that, I lock the entire flock in the coop and run for several days to break the habit of them laying outside. It really helps to find the nest, remove all eggs, and maybe mess up the area she's laying in so it does not look like such a safe place to lay.
I usually have success after about three days, but my only green egg layer was doing that recently so it was easy to know when she had layed. I left them locked up until she finished. I tried it three days. Did not work. I tried it about a week. Did not work. I tried it another week. She finally got the message. Now another one is doing it, a brown egg layer and probably one of the pullets that is just starting. I can't tell when she has done her duty, but here we go again.
It really does not happen that often, but sometimes things just happen.