You ask: "
Are there laws or rules against digging?"
Yes, in any public location, in some form or fashion or wording, there will be prohibitions against digging. The word "digging" may not necessarily be used in the city, county, state, or federal park rules. But in some fashion, it will be there. Eg.: "disturbing", "molesting", "altering", "defacing" "vandalizing" or something to that effect.
So if the question is phrased that way, you might as well give up metal detecting, and choose another hobby. Unless you intend to only retrieve targets on top of the ground, or stick to private property, etc...
Here's the catch though: In the case of any of the words used above, they ALL clearly imply an end result,
DO THEY NOT?
In other words: digging what??
HOLES is implied, right? And "holes" clearly implies
end results, right? Same for the other words: disturbing, altering, defacing, etc.... are all non-issues, if there is nothing "defaced", nothing "disturbed", nothing "altered", etc..... You left it in the same exact position it was when you got there. Oh sure, this doesn't solve the temporary evil interim process of retrieval. So again, if this is something that makes you feel awkward, you're going to have to hunt private property. I just don't see any way around that. Beach/sand may be an exception to this, but for turf, it's highly doubtful you can ever waltz into city hall and say "hi, can I dig holes in city park??" and get someone to gleefully answer "sure, go ahead".
So for this reason, I do not consider digging clauses, disturbance, defacement, vandalism, and all the other such wordings to apply to us, if you leave no trace of our presence. This won't gaurantee you 100% that someone "won't take issue" with you (even when you have utter and absolute permission from the mayor himself, those things get just as quickly revoked when some busy-body neighbor or gardener calls city hall to complain).
Therefore .......... like nose-picking, you gotta be a little more discreet than to go at high noon in full traffic time at the park. Pick low traffic odd-ball times (like after 5pm's when park people have drifted for the day. Or 5am to 7am, etc.... For me, I've actually gotten to where I simply do most of my park hunting at these odd hours, or even at night. For sure, if I arrive at a park, and see that it's maintenance day (lawn-mowing crews out), or simply too many people, I just choose another location. Not necessarily because I think I'm doing anything wrong, but just to avoid someone else arriving at any connotations, to begin with.