One of three things.
Most commonly, my solution to not have magic item shops. Items can be bought or sold, but it's a matter of finding an individual buyer/seller, agreeing a price, and then a fairly tense exchange of items and money. For convenience, we handwave all that, since I'm not running the D&D Shopping Channel, but that's basically it.
My second preference would be to have the magic item shop, let them perform the heist, and then apply all the logical consequences. Most likely including a fairly swift TPK, because people who run a magic item economy are powerful, ruthless, and not keen on second chances.
My third preference, if I really want the convenience of a MIS and really don't want the hassle of dealing with a heist, is to simply tell the players that this is a no-no. (There's a short list of other behaviours that aren't permitted at my table, either in-character or out-. It's not something I use lightly, but for some few things...)