Not "locked", but effective.
When touring I tend to go off in advance to check out a pub or whatever, and my wife catches me up.
We use a pair of walkie talkies to communicate.
Placed bikes against wall and sat in Beer Garden.
Anyone gets too close... use the radio
"You are too close t this bicycle and have set off a proximity alarm, please step back from the bike!"
Most people are sufficiently dumbfounded to do so.
On a separate note we did have one young child who thought it was a talking bike and started up a conversation - delighted when it replied to his comments and questions. A wonderful few minutes of fun.