Preheat the oven to 350°F. Butter a 9×13-inch baking dish.
Arrange the torn croissants on a baking sheet and dot with 2 tablespoons butter. Bake for 8–10 minutes, until lightly toasted.
Melt 2 tablespoons butter in a large skillet over medium heat. Add the onions and season with salt and pepper. Cook for 10 minutes, stirring occasionally, until the onions are softened and lightly browned
Add the wine and Worcestershire sauce. Cook for 5 minutes. Add the remaining 6 tablespoons butter, celery, mushrooms, garlic, thyme, and cayenne. Cook for 5 minutes. Add 1 1/2 cups broth and simmer for 5 minutes. Remove from the heat and let cool slightly.
In a large bowl, whisk together the eggs, 1/2 cup broth, blue cheese (if using), and 1 cup Gruyère. Add the caramelized onion mixture and all the buttery broth. Dip the toasted croissant pieces into the mixture, gently tossing to coat. Arrange the coated croissants in the prepared baking dish. Pour any remaining broth and onions over the top.
Top with the remaining Gruyère. Cover with foil and bake for 35 minutes. Remove the foil and bake for another 15 minutes, until golden and the cheese is melted. If needed, add a splash of broth to keep the stuffing moist. Top with fresh thyme and flaky sea salt. Serve warm!