I think part of the problem here is an I-797 doesn't have an expiration date like other documents do (I-94, EAD, green card). So if they renew your driver's license based on the I-797, when is the DL supposed to expire? They have no way of knowing if or when your pending I-485 would be approved.
Of course, they should have had proper protocols in place for this circumstance instead of making you jump through hoops for months...