Heat a skillet over medium heat and melt 1 tablespoon of butter.
Add the sliced onions and cook until caramelized, about 10 minutes.
Form ground beef into 4 patties and season with salt and pepper.
Cook the patties in another skillet over medium-high heat for 4-5 minutes per side.
Top each patty with a slice of Swiss cheese and cover until melted.
Spread butter on one side of each slice of rye bread.
Add one slice of bread, buttered side down, to the skillet.
Layer with a patty, caramelized onions, and another slice of cheese.
Top with another slice of bread, buttered side up.
Cook until golden brown, about 3-4 minutes, then flip and repeat.
Remove from skillet, cut in half, and serve warm.