Yes. That's actually normal. If you have auto start/stop enabled, if you park the car it will "stop" and if you sit for more than a couple of minutes it will shut everything down. The car does it to save the battery. It even pops up a message on the screen to tell you it is shutting down to save battery. It can be annoying if you just stop to run into your house and you come back out and it is off. You either learn to get used to it, or learn to turn off auto start/stop when you are making a pit stop.
I can't tell you how many times I have "restarted" my car trying to turn it off, not realizing it already turned itself off. Now I am training myself to take my foot off the break when turning it off in the garage so that it doesn't restart.