My 2013 car has a physical lock pull, which the door lever is connected to, so the lock opens when you pull the lever to open the door.
Teslas have an (emergency?) mechanical release on their doors. At least the Model 3 does. Given that you can't 'lock from the outside' in the ordinary sense, if this law exists, there must be some leeway.
Happened to my friends at least a couple of times when giving them a ride. Imo, not a bad situation, because the worst case scenario here is that they will accidentally use an emergency release instead of the standard one on their first try, which will only trigger tesla to make a warning sound that the emergency release was used. Definitely works out better in a real emergency situation too, compared to cars with difficult to find emergency release handles, given people not familiar with Tesla doors tend to reach for the emergency handles in those by default at times.