Preheat the oven to 350°F (175°C). Grease a 9x13-inch baking dish with butter or spray.
Caramelize the onions: In a large skillet, heat butter and olive oil over medium heat.
Add sliced onions and a pinch of salt. Cook, stirring occasionally, for 25–35 minutes until deep golden and jammy. Reduce heat if they brown too quickly.
Add garlic and cook for 1 minute until fragrant.
If using wine, pour it in to deglaze, scraping up browned bits. Let it simmer for 2–3 minutes to reduce slightly.
Stir in Worcestershire, thyme, and a few grinds of black pepper. Taste and adjust seasoning.
Rinse the rice under cold water until the water runs almost clear.
Drain well.
In the prepared baking dish, spread the rinsed rice evenly. Tuck in the bay leaf.
Pour the onion mixture over the rice. Add the warm broth, stirring gently to distribute without scraping the bottom too aggressively.
Cover tightly with foil and bake for 35 minutes.
Remove the foil, gently fluff the rice around the edges, and check for doneness.
It should be mostly tender with a little liquid remaining.
Top with Gruyère and Parmesan. Return to the oven, uncovered, for 10–15 minutes, until the cheese is melted and lightly golden and the rice is fully cooked.
Rest for 5–10 minutes. Remove the bay leaf, sprinkle with parsley, and serve warm.