Welcome back!!!
When my kids failed to listen in public - they were to hold my hand or go into a stroller.
At ALMOST 3 - he knows what he is doing is wrong. He is testing his boundaries to see what he can get away with. And it's now become a game....chase Johnny....don't chase him. Stop and tell him to come back to you. Use a firm voice. Tell him the consequences if he does NOT do as you say -
a. we are leaving (and MEAN IT)
b. you will go in the stroller.
c. you will HAVE to hold my hand.
You have to mean what you say. If you say, "we are leaving" and don't. He knows you are NOT serious and can get away with it. It's NOT a game. You are not there to be his friend. You are there to parent him. This is the toughest stage as they are learning independence, right from wrong, etc.
I'll say it again.....You have to be the parent. Not the friend. Set rules. Set boundaries and consequences for misbehaving and rewards for behaving.
For example, when my boys were younger and they wanted a piece of candy after we were finished grocery shopping, they would have to behave...if I had to talk to them - they lost. If they behaved, they were rewarded...some call it a bribe...but really...you go to work, you get paid. You were rewarded for your job.
Make it his job to behave.
Good luck!!