It may be a security related issue. How many miles can you travel before the vehicle shuts itself down? If the vehicle shuts down before you can make any progress it is likely a security related issue. If a few miles can be driven before shutdown it is likely something else. Did you do the work yourself or at a repair facility? If performed by a facility, it should be under warranty.
Understood - Does a dashboard "theft" or "security" light blink when this issue arises? If so, it is most likely security related. Ultimately, I suspect a service visit may be the fastest path of resolution (and peace of mind).