Sauté the onions: Using a mandolin or knife, thinly slice the onion. Heat 2 tbsp butter in a skillet over medium heat. Add the sliced onions with a pinch of salt and pepper and cook, stirring occasionally, for 10 minutes until soft and slightly golden. Drizzle in the balsamic glaze and cook another 2–3 minutes until jammy. Remove from the pan and set aside.
Sauté the mushrooms: In the same skillet, 2 tbsp butter over medium-high heat. Slice mushrooms and add to pan along with sprigs of thyme. Let them cook undisturbed for a few minutes to develop color. Stir and continue cooking until golden and tender, about 6–8 minutes total. Season with salt and pepper.
Assemble the sandwiches: Butter one side of each slice of sourdough. On the unbuttered side, layer fontina cheese, a generous spoonful of balsamic onions, sautéed mushrooms, and a little more cheese. Top with the second slice of bread, buttered side facing out.
Grill until melty: Heat a skillet over medium. Cook sandwiches 3–4 minutes per side, pressing gently, until the bread is golden and crisp and the fontina is fully melted.Slice and serve warm — crispy on the outside, sweet and savory, and irresistibly gooey in the center.