https://www.caranddriver.com/features/a27630736/awd-vs-4wd/
The primary reason there's a 4WD vs AWD distinction is the ability to lock the differentials, and that determines the mechanisms that the wheels are driven by.
And that's why they use those terms in a prescriptive law context.
to simplify:
AWD -> power gets to all wheels (driven wheels) but wheels are usually allowed to spin at different speeds to facilitate pavement driving and turning.
4WD -> power gets to all wheels, but there is a locking mechanism that locks all wheels so they all turn at the same speed - if you know the physics of turning objects, it means turning while underway is either impossible or damaging to the drivetrain. This is however, useful in mud or rock, or challenging terrain. When on mud or rock or whatnot, you turn, move a bit, stop, check, turn a bit, move, stop, check, turn a bit, movie, stop, etc. So the fact that all wheels turn at the same time is an advantage.
The reason some 4WD don't have a "differential lock" is that it's fused by bare metal - it doesn't need a lock because it's welded together, so no lock needed!
The car and driver article gives an easy test: if the car manual tells you "this is bad for road driving" - that's 4WD.
you might think "well 4WD is terribly useless for regular driving" and you would be entirely correct. That's why most 4WD cars incorporate both modes of driving mechanisms so they can switch.
You can tell apart a permanent 4WD / full time rock climber by the owner needing to use a trailer to move the vehicle instead of driving it over the highway, usually they use a pickup truck or SUV with a regular drivetrain to haul gear and pull the trailer with the 4WD vehicle to the trailhead, unload, then go into places like Death Valley Back Country or Moab with the 4WD vehicle.