Heat olive oil in a large skillet over medium-low heat. Add the sliced onions and cook, stirring occasionally, until deeply golden brown and caramelized, 20 to 25 minutes. Season with salt and pepper.
Meanwhile, preheat a cast iron skillet over medium-high heat. Melt 2 tablespoons of butter in the hot skillet.
In a large bowl, gently mix together the ground beef, ketchup, Worcestershire sauce, ½ teaspoon onion powder, 1 teaspoon salt, and some pepper until just combined. Divide the meat mixture into four equal patties and shape each into rounds slightly wider than the bread slices.
Cook the patties in the hot skillet for 4 to 5 minutes per side until well browned. Remove from the pan and set aside.
Assemble the patty melts: Wipe out the skillet and melt 2 tablespoons of the remaining butter over medium heat. Lay 4 slices of rye bread, buttered side down, in the skillet. Top each with a burger patty, a slice of Swiss cheese, half of the caramelized onions, and another slice of cheese. Close the melts with the remaining 4 slices of buttered bread, placing them buttered side up onto the sandwich.
Cook each patty melt until both sides are golden brown and the cheese is fully melted, 2 to 4 minutes per side, pressing gently with a spatula to help melt the cheese.
Transfer the patty melts to a cutting board and slice diagonally to serve. Enjoy!
