Peel onions and slice thinly and evenly (about ⅛-inch thick) using a mandoline or chef's knife. Set aside.
Heat butter and olive oil in a Dutch oven over medium heat until butter melts and foams. Add onions and salt, stir to coat, reduce heat to medium-low, and cook for 35-40 minutes, stirring every 5-7 minutes, until softened and golden.
Sprinkle sugar over onions and continue cooking for 15-20 minutes, stirring more frequently, until onions are deep amber brown and jammy. Scrape up browned bits from the bottom.
Stir in garlic and cook for 1 minute until fragrant. Pour in wine and scrape the pot bottom to lift browned bits. Simmer for 2-3 minutes until wine is mostly reduced.
Sprinkle flour evenly over onions and stir constantly for 1-2 minutes to coat and remove raw flour taste.
Slowly pour in vegetable broth while stirring. Add Worcestershire sauce, bay leaves, thyme, and pepper. Bring to a gentle boil, then reduce heat and simmer uncovered for 25-30 minutes. Taste and adjust salt, remove bay leaves.
While soup simmers, preheat oven to 400°F (200°C). Arrange baguette rounds on a baking sheet and toast for 8-10 minutes, flipping halfway, until golden and crisp on both sides.
Switch oven to broil. Ladle hot soup into oven-safe crocks. Float 1-2 toasted baguette rounds on top and cover generously with shredded Gruyère. Place crocks on a baking sheet and broil for 2-4 minutes until cheese is melted, bubbly, and lightly browned. Let cool slightly before serving.