Trim and peel each onion, cut out the tough root end, then halve from top to root. Lay each half flat and slice from top to root into ⅛ to ¼ inch thick pieces so they hold their shape during the long cook.
Melt the butter with the olive oil in the Dutch oven over medium heat. Add all the onions, salt, pepper, and sugar, toss to coat, cover, and cook for 10 minutes, stirring once halfway through.
Remove the lid and cook at medium to medium low for 45 to 55 minutes, stirring every 5 to 7 minutes at first and every 2 to 3 minutes as they darken. Scrape up the browned bits each time; add a splash of water if they stick. They are ready when very soft, jammy, and deep golden brown.
Pour in the white wine and raise the heat to medium high. Scrape the bottom firmly to loosen the browned bits and let the wine bubble for 5 to 8 minutes, stirring often, until almost completely evaporated.
Reduce the heat to medium, sprinkle the gluten free flour evenly over the onions, and stir constantly for 1 to 2 minutes so no dry pockets remain.
Stir in 1 cup of broth until smooth, then add the remaining 5 cups along with the Worcestershire sauce, thyme, and bay leaves. Bring to a boil, then simmer gently with the lid ajar for 30 minutes, stirring every 10 minutes.
Heat the oven to 400°F (200°C). Arrange the baguette slices in a single layer on a rimmed baking sheet and bake for 8 to 12 minutes, flipping halfway, until dry, crisp, and golden at the edges.
Remove the bay leaves and thyme stems, stir in the dry sherry, and simmer for 2 more minutes. Taste carefully and add salt or pepper a pinch at a time until rich and balanced. Keep the soup very hot.
Set the oven rack about 6 inches below the broiler and turn the broiler to high. Ladle the soup into 6 broiler safe crocks on a rimmed baking sheet, leaving ½ inch of space, float 2 toasts on each, then scatter the Gruyère and Parmigiano Reggiano evenly over the tops and out toward the rims.
Broil for 2 to 5 minutes, watching the whole time, until the cheese is melted, bubbling, and browned in spots. Remove carefully with oven mitts, rest each crock on a heatproof plate for about 5 minutes, and warn everyone that the bowls are extremely hot.