Melt the butter with the olive oil in a large Dutch oven over medium heat. Add all the sliced onions and stir to coat. Cook for about 10 minutes, stirring occasionally, until the onions have softened and reduced in volume significantly.
Reduce the heat to medium-low and sprinkle the sugar over the onions. Continue cooking, stirring every few minutes, for 30 to 40 minutes until the onions are deeply golden brown and jammy. Be patient here as this slow caramelization is what gives the soup its signature flavor.
Stir in the garlic and cook for 30 seconds until fragrant. Pour in the white wine and scrape up any browned bits from the bottom of the pot. Let the wine simmer for about 2 minutes until it has mostly evaporated.
Add the beef broth, tamari, thyme, and bay leaf. Bring the soup to a simmer and cook for 15 to 20 minutes to let the flavors meld together. Season with salt and pepper to taste, then remove and discard the bay leaf.
Preheat the broiler. Ladle the soup into oven-safe crocks or bowls and set them on a sturdy baking sheet. Place a slice of toasted gluten free bread on top of each bowl, then mound a generous amount of gruyere cheese over the bread.
Broil for 2 to 4 minutes, watching closely, until the cheese is bubbly, melted, and deeply golden brown in spots. Let the bowls cool for a few minutes before serving, as they will be extremely hot.