Gas has a nice linear relationship with road usage. (Farms can currently buy tax exempt gas and diesel explicitly for this reason).
A lot of states have experimented with mileage-based tracking for EVs but there is no realistic way to do it that's not super fiddly or privacy invasive.
Couldn't states take an odometer reading at tag renewal time and charge based on distance traveled? It wouldn't perfectly capture usage of in-state roads, but it should be close enough on average, it reuses existing mechanisms, and it doesn't require any sort of location tracking.