Mix ground beef with Worcestershire, salt, and pepper. Divide the mixture into 4 equal portions, and shape each into a patty slightly larger than the bread slices.
Melt the butter in a skillet over medium-low heat. Add sliced onions and cook, stirring occasionally, until caramelized, about 20-30 minutes. Remove onions and set aside.
In the same skillet, cook the patties over medium heat until browned and cooked to desired doneness, about 4 minutes per side. Remove and set aside.
Lay out 4 slices of rye bread; spread mayonnaise on them if desired. Top each with a slice of Swiss cheese, a patty, a quarter of the caramelized onions, another slice of cheese, and another slice of bread.
Heat the skillet over medium heat. Place the sandwiches in the skillet and cook until the bread is golden and the cheese is melted, about 3-4 minutes per side.