Well, as we've been hearing over and over again, the masks we are being told to wear aren't designed to keep you safe. They are designed to keep you from spreading the virus to others if you are sick. People will not be able to keep masks on while eating, so if someone is sick and coughing, breathing out the virus and touching surfaces in the restaurant, they would probably be more likely to transmit the virus to others inside than outside. For that reason, I think you are right that walking outside where infected people are wearing masks would be safer than eating inside, where they would have to remove the mask in order to eat.