1. Heat a skillet over medium heat and add 2 tablespoon of butter. Add the sliced onions and cook until caramelized, about 10 minutes. Remove from skillet and set aside.
2. Form the ground beef into 4 patties. Season with salt and pepper.
3. In the same skillet, cook the patties over medium-high heat until browned and cooked through, about 4-5 minutes per side. Remove from skillet.
4. Butter one side of each slice of rye bread. Place 4 slices, butter side down, in the skillet. Top each with a slice of Swiss cheese, a beef patty, caramelized onions, and another slice of Swiss cheese. Top with remaining bread slices, butter side up.
5. Cook sandwiches over medium heat until bread is golden brown and cheese is melted, about 3-4 minutes per side.