short of taking your bicycle into the shower with you, or into a store, there isn't much you can do to prevent someone from rifling through your panniers. If you're panniers have grab straps or they can be connected together you can disconnect them and throw them on your shoulder or carry them in like suitcases, but that's a hassle as well, plus there is other stuff on the bike that you simply can't take it all inside with you. The only option you have is to place the bike near a window so you can see the bike while inside a store, and take a seat next to the window that the bike is parked against if in a restaurant, that's what I do, I find an empty seat from outside first put the bike next to that window then go inside and request that window or set at that window table. I've never had anyone bother my bike, and others I spoke to about that possibility have never had their bikes bothered either when touring, but there is that thing in the back of anyone's head that tells you, or bugs you, that someone could someday mess with your stuff, so you don't want to get lackadaisical about it, but at the same time not get so paranoid about it that it ruins the fun in touring or camping.
I did buy a better locking system for my bike, but I'm not going to use while touring due to the weight of it, but it is a heavy smallest gauge chain that Abus sells, and then I got a Masterlock combo lock that I will take to use on my cable when camping because it's a lot lighter than the chain and I don't want to carry more weight, and the combo lock is so I don't lose my key accidently while camping or touring. I use the chain and combo lock at work now.