Well, if it is under warranty still, I would contact the manufacturer about a repair/replacement.
If it isn't under warranty any longer, then either you can check, or have a tech check, for anything loose inside. Especially the connections to the battery. If it can wiggle or shift and lose its direct connection to the laptop that would cause it to turn off. The same goes for the other components.