That’s why a lot of places now scan the ID. Presumably the vast majority of times whoever lost/gave up/sold the ID got a new one from the local BMV and the old one will be flagged.
The 2d barcodes and magstripes on these cards do have all the info that's printed, though, so I would bet that a "gifted" ID that hasn't expired but which you've replaced or claimed as lost would still work at a retailer who scans IDs.