I still bring my two into stores in a stroller for this reason haha
I bring my stroller everywhere. If either runs I give one warning. If they do it again they go in the stroller. Once they say they’ll stay they come back out and we try again. I give a few chances. If they keep not listening we leave. They’re both getting much better about understanding the rules with practice. My kids are not 4.5 and 22 months but we’ve been working on it for a while. I also go over rules before we go somewhere. We stay together. If we can’t stay safe we will have to leave. My little one has great understanding of language and understands me. If he wants to stay he tries his best to listen. My older one struggles a lot more with it.
I’d say if your main rule is they don’t run off , think of whatever easy consequences you can implement EVERY time so it’s easy for them to understand cause and effect. You ran, now you …. ….have to stand here and hold my hand. …you’re in the cart/stroller. …we’re going home Give warnings or chances as you see fit and be really clear with them. It sucks having to leave but those experiences are helpful for kids to really learn.
I put mine in a stroller or shopping cart
I'd suggest just keeping your 1 year old interested. Like when walking around a shop, ask what is this? Or wow look at this. And just keep them engaged in everything whilst you go around