Preheat the oven to 375°F.
In a spacious skillet set over medium-high heat, melt the butter until fully liquefied. Introduce the sliced onions, seasoning them with kosher salt, black pepper, and dried thyme. Allow the onions to cook slowly, stirring intermittently, until they soften and develop a deep caramelized hue.
Pour in the dry sherry or dry white wine to deglaze the pan, stirring to lift the browned bits from the bottom. Add the beef broth and bring the mixture to a gentle boil. Maintain a simmer until the liquid reduces significantly, approximately 5 to 10 minutes.
Meanwhile, slice off the upper third of each baked russet potato and carefully scoop out the interior flesh, transferring it into a mixing bowl. Blend in half of the onion mixture with the potato flesh until well combined.
Refill each potato shell with the onion-potato blend, then arrange the filled shells on a baking tray. Top with the reserved onion mixture, followed by an ample sprinkling of Gruyere cheese.
Bake in the preheated oven until the cheese has melted and turned a light golden brown. For an intensified crust, place under a high broiler for about 1 minute.
Remove from the oven and serve promptly while hot.