The ducks will not stay penned

The ducks' portable coop is in the farm field with the chicken's eggmobile. enclosed with electrified chicken netting.  They have plenty of food and water. After herding them into the enclosure each evening, I find them roaming the farm in the morning. Since they do not cause much damage,although I need to check the young melon plants in the hoop house where I saw them during this morning's downpour, they could stay out, BUT I do need their eggs.

Not sure what the next step is.