I love a good cheeseburger! Years ago I got tired of having toppings push out the opposite side that I bite from, and put a lot of thought into this very serious problem. I have a few approaches, and I combine them all into the construction of a burger that does a real good job of staying together while I'm eating it.
Meat contracts when it cooks, and I found that if I make thinner patties that are shaped like a shallow bowl, with the edges being thicker than the center, after cooking it will have contracted into something nearly flat, as opposed to making a flat patty that cooks and contracts into a dome shape. This dome shape foundation was one source of toppings working their way out of the burger. The next points of study in my burger topping analyzing was friction. I like my burgers with everything, and that to me means cheese, lettuce, onion, tomato, pickle, salt & pepper, mustard and some mayo on the bun. Considering the textures of the toppings and that mustard and mayo act like grease on car parts, I tried applying toppings in different orders. I start off with a burger patty that has cheese side up on the bun that has mayo on it, and melted cheese isn't very grippy, so I go ahead and put mustard on the cheese as I don't think it will really make it any more slippery, then I apply a few rings of onion. The three or four rings of onion offers a surface that will press into melted cheese and mustard to the burger patty surface and offer a somewhat non-slip surface above. This is where I add a few slices of pickle rounds as they tend to nest within the structure of the onion. Next a slice of tomato and which I sprinkle sea salt and fresh ground pepper which provides a grit to the surface, like sand on an icy sidewalk. Then comes lettuce followed by the top bun. It's still not completely perfect but was a huge improvement, so the final piece to anchor the sum of all parts together is a long toothpick through the center! Mmmm!