Make the onion topping: Combine the onions, flour, panko and salt in a large mixing bowl or paper bag and toss to combine.
Warm 1 ½ Tablespoons of butter and 1 ½ Tablespoons of oil in a large skillet over medium heat. Drop one piece of onion in the pan to make sure it sizzles. Add as many onion pieces as can fit in the pan in one layer. You may need to do this in batches.
Turn the onions when they become golden on the bottom. Cook until crispy and golden on the other side. Transfer onions to a plate lined with a paper towel. If you have to cook a second batch, you may need to wipe out the pan and start with fresh butter and oil.
Prepare the green beans and casserole:
Blanche green beans: prepare a bowl of ice water for the green beans. Bring a large pot of water to a boil and add the kosher salt. Add the beans and set a timer for 3 minutes. Drain and immediately submerge in the ice water bath. Drain after 5 minutes or so, pat dry, and place green beans in a 9” square or round baking dish.
Melt the butter in a medium skillet, add mushrooms, season with salt and pepper to taste, and sauté over medium until mushrooms have lost their shape and released most of their liquid (about 5 minutes).
Stir the flour and thyme into the mixture and cook for another 1-2 minutes.
Add the mushroom stock, Worcestershire sauce, and salt and pepper. Bring to a simmer and cook until the sauce has thickened, stirring occasionally, about 6-8 minutes. Taste for seasoning.
Pour evenly over green beans, top with the crispy onions and bake at 350 degrees until bubbling on the sides and the beans are warmed through, about 15-20 minutes. Serve immediately.