Yes.
Just take your battery inside with you when you are at the store. Mine, plus everything not nailed down on the bike (panniers, tool kit, lights) goes in the bag that held the bike lock.
Look at it this way: Do you leave items costing hundreds of dollars that are easy to walk off with in plain sight in an unlocked car when you walk into the mall (you may have to google what a mall is depending on your age)? Same rules apply here.
Like anything, there are times you'll figure the risk is worth it for a variety of reasons. Just don't be dumb about it.