My understanding is that there is a vacuum or electronic operated clutch within the front differential of modern trucks that disconnects the front axles from being driven until the truck is put into 4WD.
I did a search and found this pertaining to Monte's Ranger:
"The front axles do spin any time the truck is rolling, the disconnect is on the pass side of the front axle (vacuum activated). When in 2wd, the transfer case does not apply power to the front drive shaft, and the passenger side axle is not connected to the front diff."
Both my 2002 Toyota Tacoma and 2018 have a similar arrangement.
Even with manual hubs, in the old days of solid axles on 4x4's you would often see the front driveshaft slowly rotate at highway speeds if you were driving alongside.