Peel and thinly slice the onions using a sharp knife or a mandoline for uniform thickness.
In a large pot or Dutch oven, heat the butter and olive oil over medium heat. Add the sliced onions along with salt and sugar, stirring to coat the onions.
Cook the onions, stirring frequently, for about 20-25 minutes until they are golden brown and caramelized.
Add the white wine to the pot, scraping the bottom to deglaze and release any browned bits. Let the wine simmer for about 5 minutes until reduced by half.
Pour in the beef broth, add the thyme and bay leaf, and bring the mixture to a boil. Reduce the heat to low and let it simmer for an additional 15-20 minutes.
Taste the soup and adjust seasoning with salt and freshly ground black pepper to preference.
While the soup is simmering, preheat your oven to 400°F (200°C). Place the French baguette slices on a baking sheet and toast them for about 5-7 minutes until lightly browned.
Remove the bay leaf from the soup. Ladle the soup into oven-safe bowls or crocks. Place a slice of toasted baguette on top of each bowl, and sprinkle generously with grated Gruyère cheese.
Place the bowls under the broiler for about 2-3 minutes until the cheese is bubbly and golden brown. Watch closely to prevent burning.
Carefully remove the bowls from the oven and allow them to cool slightly before serving.