Mine do the same thing.
The only way to prevent it is to keep them penned.
It is an instinct for them to find a safe place to hide & lay eggs.
I found a nest in a window well that had 15 eggs.
I wish I knew where they are hiding them now. I've looked everywhere.