Take the ground beef and shape it into a patty, about ¾ inch thick. Sprinkle both sides of the patty with kosher salt and black pepper.
Heat a large skillet over medium-high heat. Once hot, add the patty to the skillet and cook for 4 minutes per side (or until desired doneness). Once cooked to your liking, remove the patty from the skillet and set aside.
In the same skillet, add 2 tablespoons of butter or mayonnaise and allow it to melt. Add in the diced onions and cook for 8 minutes or until caramelized. Set aside.
Take 4 slices of rye bread and spread 1 tablespoon of butter or mayonnaise on one side of each slice. Place a cooked patty on top of two slices, followed by the cooked onions and both cheeses. Top with the remaining two slices of bread, butter/mayo side down.
In a large non-stick skillet, heat 2 tablespoons of butter or mayonnaise over medium-high heat. Once hot, add the assembled patty melts to the pan and cook for 3 minutes per side (or until golden brown.) Turn off the heat and serve immediately.