This is one of those situations where I think it's very easy for people to talk past one another. Last time I ran a Vampire game we established what city it was located in, what factions the PCs belonged to, and the tenants each PC was expected to live by lest they be penalized. San Francisco, the entire Bay Area actually, was the sandbox I poured all my creative energy into. I created multiple NPCs, political factions, religious groups, humans, etc., etc. to build a rich campaign setting but the PCs were free to do whatever they wished. They could work to overthrow the Prince, switch factions, make friends, make enemies, and do whatever their little black hearts desired. They had free reign in the sandbox.
But if they decided things were too tough and abandoned San Francisco in favor of Seattle they would have effectively left the sandbox. I would be totally unprepared for such a thing to happen because I haven't outlined what's going on in Seattle. That's what going out the sandbox means to me.
Right, but this is a prep issue, and only exists where the GM is protecting their prep. Not a bad thing, mind, but it's not a feature or requirement of the game, but instead a requirement the GM has created. If protecting this prep is also what causes a GM to shoot their campaign in the foot, it's a GM caused issue.
My point is that calling this issue of prep something like the "walls of the sandbox" is foisting off the responsibility. Again, if you've done this, if you like games with heavy prep (both in terms of effort and in terms of immobility), that's awesome. The only right way to play is the way that's fun for you. But, if you're going to analyze this, you need to be honest about what part you've picked out for yourself. This is not a necessary way to play, so you cannot pin it on the "walls" of the sandbox -- walls that are entirely established by you where you want them. Honest evaluation of the gamestate is sometimes not flattering, but this is a good thing -- you don't have to be flattered to enjoy a thing.
My example of this is that I establish themes for a game that I'm running, and I want the game to focus on those themes. I get buy-in from my players on these themes, and leave room to explore other things they might bring with them, but abandoning those themes is not what I'd like in that campaign (perhaps another). I wouldn't call these the walls of the sandbox, though, because it removes my agency in establishing and enforcing them. If sticking to these themes derails a game, that's on me, not the nature of the game. I don't have to stick to them, and I don't have to let them derail my game -- I'm perfectly free to change them, and still have a fun game (sometimes this happens). But, my preference is to stick to the themes.
And I say themes intentionally, because that what they are -- overarching elements of play. I'm not a heavy prep person for my 5e game, although I do prep. I'm also not very attached to my prep -- if something better comes along in play, I'll happily and greedily switch. I've found that exposure to other games, where prep is so different as to be unrecognizable as such in a D&D sense (Blades in the Dark, for instance, actively fights against prep), has improved my ability to prep in 5e games. It's focused my prep away from anticipating outcomes and only on making sure I have what I need to easily adapt to play. I've found I tend to prep locations, not plots. In other words, my "walls" have become unnecessary because I'm not trying to constrain play (within the agreed themes, of course, but, honestly, this is an easy thing to just reinforce in play via framing).