Most states have laws against altering state issued IDs. This includes obstructing the info on them in any way.
The best solution is to tell businesses that want to scan your ID to go take a hike and take your business elsewhere. But if that's not a realistic option, I'd have no qualms about using a sticker like this temporarily. Attach it before entering the establishment, remove it when you leave.
That said, many establishments that scan IDs aren't scanning just the bar code. They're taking a photo of the entirety of the front and back of the card. These stickers are less effective at protecting against that.
The only places I've seen photo IDs are weed stores. Screw those places. Honestly best to grow your own if it's legal in your state.