My son is 3yrs and at times has run off, but we don't let him get that far. I know him too well. I too have used a leash. And I look at it this way, people will look. But then thye don't understand. My grandmother used a leash on my father and that was 60+ years ago. I like what she said when people starred or said something negative. "I would rather have him on a leash than kidnapped or in the street dead." that usually made the star go away.
My son will throw tantrums when I want him to stay in the cart or stroller; that just tells me that he is upset because he is not getting his way. He is learning that to get his way he has to obey. It is a difficult stage for them right now. But no matter what others say or think you must be consistant or all the effort will be for nothing. And I know from experience that for all the stares and bad looks there are equal numbers if not more from those that applaud your efforts to care for your child even if he doesn't agree or understand. Good job and keep it up.