Whisk mayonnaise, ketchup, mustard, pickles, Worcestershire sauce, garlic powder, salt, and pepper in a small bowl, then set aside.
Melt butter in a skillet over medium heat, add sliced onions, and cook 10–12 minutes until golden and soft. Remove from the skillet.
Divide beef into 4 portions, flatten into thin patties slightly larger than the bread, and season with salt and pepper.
Cook patties in the same skillet for 2–3 minutes per side until browned and cooked through. Set aside.
Butter one side of each bread slice. On the unbuttered side of four slices, layer cheese, a patty, onions, a spoonful of sauce, and another slice of cheese. Top with remaining bread, buttered side facing out.
Heat skillet over medium and grill sandwiches 3–4 minutes per side, pressing gently with a spatula, until golden and cheese is melted.
Slice diagonally and serve hot with extra sauce.