It’s not prohibited to use an underwater metal detector on land when searching over sand or dirt. Since they work well under the water, there’s no way they wouldn’t be able to operate beneath the ground.
That being said, waterproof underwater metal detectors are known for weighing much more than their on-land counterparts. The manufacturers, therefore, have to use heavier elements in order to equip them with water-friendly features, which makes them considerably heavier. Take it or leave it.