In a large pot over medium heat, add the olive oil. Add the sliced onions, salt, and sugar, and sauté slowly, stirring occasionally, until deeply caramelized (about 45–60 minutes).
Add the minced garlic and cook for 1-2 minutes more.
Sprinkle in the flour, stirring constantly for about 1 minute to cook out the raw taste.
Deglaze the pot with the white wine, scraping up any browned bits.
Add vegetable broth, soy sauce, bay leaf, and thyme. Bring to a simmer and cook for 20–30 minutes.
Preheat your broiler. Ladle the soup into oven-safe bowls, place a slice of baguette on top of each, then top with vegan cheese.
Place the bowls under the broiler until the cheese melts and turns golden brown. Serve hot.
Notes
You can skip the wine for a non-alcoholic version. Use gluten-free flour if needed, and choose your favorite vegan cheese for topping.