Heat a large cast iron skillet over medium heat, then add 2 Tbsp unsalted butter. Once melted, add the onions and cook, stirring occasionally every few minutes, until the natural sugars release and the onions take on a deep, golden brown color.
Divide the ground beef into 4 equal portions, then shape them to roughly match the bread slices. Season the top of each patty generously with Kosher salt and freshly ground black pepper. If using mustard, spread about ½ teaspoon on top of each patty.
Place the burger patties in the skillet seasoned side down, then use a spatula or a weight to press down firmly. Immediately season the top of each with additional Kosher salt and black pepper to taste. Cook. Transfer to a plate or wire rack.
You can wipe out the skillet or not. Heat the remaining tablespoons of butter in the skillet over medium heat, then add 2 slices of rye bread. Begin assembling the sandwiches
Place Swiss cheese on each piece of bread, then add 1 burger patty and a few tablespoons of caramelized onions on top. Finish with a second slice of Swiss cheese, then place the remaining bread slices on top. Cook until the cheese has fully melted and the bread is toasted.
Transfer each patty melt to a cutting board, then slice on the diagonal. Serve immediately with chips and pickle spears