Begin by preparing the onions. Slice them from root to stem, removing the outer skin, and thinly slice along the grain into ⅛” thick pieces. Set the slices aside for later.
Generously season the chicken breasts with salt and pepper on all sides.
Heat the oil in a large skillet over medium-high heat until shimmering. Add the seasoned chicken, ensuring it’s spaced apart without touching, and sear each side. Allow the chicken to cook undisturbed for a few minutes per side until fully cooked. Once done, transfer the chicken to a plate and set it aside.
Lower the heat to medium, and melt the butter in the same skillet. Once melted, add the onions and sprinkle in the sugar. Stir to coat the onions in butter, then cover the skillet with a lid and let the onions cook for about 10 minutes. Afterward, remove the lid and continue cooking, stirring occasionally, until the onions soften and lightly caramelize.
Add the minced garlic to the onions and cook briefly until fragrant.
Pour the dry white wine into the skillet, allowing it to cook off until the onions fully absorb the wine and the strong aroma dissipates.
Sprinkle the flour over the onions, stirring to incorporate it. Let the flour cook for another 30 seconds to toast slightly.
While continuously stirring, gradually pour in the beef broth. Add the thyme, along with salt and pepper to taste, stirring until well combined.
Return the chicken to the skillet, nestling it into the onion mixture. Cook until the sauce thickens slightly and the chicken is fully cooked, with its internal temperature reaching at least 165°F (73°C).
Divide the shredded gruyere cheese, placing approximately 1 ½ oz (42g) over each chicken breast.
For a golden, bubbly topping, transfer the skillet to the broiler and broil until the cheese is melted and beginning to brown. Alternatively, you can cover the skillet with a lid and allow the cheese to melt for a few minutes on the stovetop.
Once ready, remove from heat and serve immediately. This dish pairs wonderfully with mashed potatoes and a side of green beans or broccoli for a complete, hearty meal.