Caramelize the onions. Heat the olive oil and butter in a large oven-safe skillet over medium heat. Add the sliced onions and stir every few minutes. Cook slowly for 45–60 minutes, allowing the onions to become deeply golden and caramelized. If they begin to dry out, add about 1½ teaspoons of water at a time and stir.
Prepare the cooking water. About 40 minutes after starting the onions, bring a medium pot of salted water to a boil.
Add the aromatics. Once the onions are deeply caramelized, stir in the fresh thyme and minced garlic. Cook for about 2 minutes, until fragrant.
Deglaze the skillet. Add ½ cup beef stock and a small splash of vinegar if desired for the tangy flavor normally provided by wine. Cook for 3–4 minutes, allowing the liquid to reduce by about half.
Thicken the sauce. Stir in the flour and cook for 1–2 minutes. Add the Dijon mustard and halal-certified Worcestershire-style sauce, stirring until everything is evenly combined.
Add the broth. Pour in the remaining beef stock and add the bay leaf. Scrape the flavorful browned bits from the bottom of the skillet. Bring the mixture to a boil, then reduce the heat and simmer for 6–7 minutes, until the sauce has slightly thickened. Season with salt and freshly cracked black pepper.
Cook the gnocchi. While the sauce simmers, add the gnocchi to the boiling salted water. Cook according to the package directions, usually until the gnocchi float to the surface. Drain well.
Combine everything. Transfer the cooked gnocchi to the caramelized onion sauce and gently stir until evenly coated. This caramelized onion gnocchi should be saucy and well combined.
Add the cheese. Sprinkle the freshly grated Parmesan over the gnocchi first, followed by the Gruyère.
Broil until bubbly. Transfer the oven-safe skillet to the oven and broil for 3–5 minutes, watching carefully, until the cheese is melted, bubbling, and lightly golden.
Serve. Garnish with fresh thyme and serve immediately with crusty bread, a crisp salad, or another favorite side.