You should absolutely never hand your phone over to anyone (I mean, beyond a friend or relative, depending on how much you trust them). In at least some of the states, the laws are written so that law enforcement is not allowed to touch the phone. They get what they need by either NFC or QR code, or by simply reading the information off the screen while you hold the phone (think of it as a self-lit drivers license at that point, no need for a flashlight).
Eventually, we'll likely get to the point where they're accepted for proof of age for getting into clubs or buying alcohol, and it'll be the same deal. In all of those cases (cop / cashier / bouncer / etc), if they reach for your phone, the appropriate response is some situation-specific version of "do not touch!", and if they quibble, have them call their manager - don't hand the phone to any of them.
You'll find a contingent on this forum who keep spinning scenarios of cops who they insist will say, "oh, my scanner is broken, I need to take your phone back to my cruiser", and the answer is still, "no, sorry, you need to get your supervisor or another officer here with a working scanner out here, I will not surrender my phone to you" (if they persist, follow up with, "I need to get your badge number and name for the report I'll be filing").
In any case, the license displays in Apple Wallet without unlocking the phone itself, just like a credit card. Most of the what-if scenarios involve an officer carrying your unlocked phone back to their cruiser and poking around it in - even if they took your phone, that's not possible, unless they force you to unlock it first. At which point, they're clearly breaking the law. I mean, if you buy into that scenario, why not just have them shoot you, too - they have the gun right there.