Never.
2 things to help prevent getting stolen. 1) Remove your helmet and loop the straps thru the front wheel and frame and buckle it together. A thief has to remove the helmet for the bike to roll anywhere. 2) As you are about to stop, shift to big ring and smallest cog. That makes it hard for a thief to get up to speed as they hop on and try to roll away.
I only leave the bike to go into a convenience store for a drink and it’s never out of sight.