01 - Preheat oven to 400°F. Grease a 2-quart baking dish with butter or cooking spray.
02 - In a large skillet, heat 3 tbsp butter and 1 tbsp olive oil over medium heat. Add sliced onions, thyme, and 1/2 tsp salt. Cook, stirring frequently, for 20–25 minutes until deeply caramelized and golden brown. Lower heat as needed to prevent burning.
03 - Stir in minced garlic and cook for 1 minute until fragrant. Add white wine and Worcestershire sauce, scraping up browned bits from the bottom of the skillet. Simmer until mostly evaporated, about 3 minutes. Remove from heat and set caramelized onions aside.
04 - Bring a large pot of salted water to boil. Cook pasta according to package directions until just al dente. Drain well and set aside.
05 - In the same skillet (wipe clean if needed), melt 2 tbsp butter over medium heat. Whisk in flour and cook for 1–2 minutes, stirring constantly to form a roux. Gradually whisk in milk and heavy cream, stirring constantly until sauce thickens, 3–5 minutes.
06 - Reduce heat to low. Stir in Gruyère, sharp cheddar, and Parmesan cheeses until completely melted and smooth. Season with black pepper.
07 - Add caramelized onions and drained pasta to the cheese sauce. Fold gently until pasta is evenly coated with sauce.
08 - Pour the pasta mixture into the prepared baking dish, spreading evenly.
09 - In a small bowl, combine panko breadcrumbs, melted butter, and grated Gruyère cheese. Mix until breadcrumbs are evenly coated.
10 - Sprinkle the breadcrumb mixture evenly over the pasta. Bake for 20 minutes until the topping is golden brown and the sauce is bubbling around the edges.
11 - Remove from oven and let rest for 5 minutes to allow the sauce to set slightly. Garnish with chopped fresh parsley if desired and serve hot.