If they are 2 & 4 I think they will always do it.
An option might be to provide them with an outlet for their digging desires.
An old clam shell (ask on freecycle) with dirt and sand in it and a bone or two for them to hunt for might keep them busy so that they leave your garden alone.