I think they don’t take your phone, just scan it. I don’t know how it works with this, but I have a trial for my state’s digital ID app (the app works but isn’t fully implemented as a complete replacement for physical IDs yet), and it has two modes I can put it in which generates a QR code on the screen with my data. One mode for police to scan at traffic stops which has my driver’s license info, and one just called “age verification” which can be presented when buying alcohol which just verifies that I’m over 21. I like the privacy of the second mode, since there’s no reason a liquor store needs to be able to see my home address.
I did the same thing with home assistant and just the stock clock app. Just looking at the “next alarm” sensor state.