2 pounds green beans – trimmed, cut into 2-inch pieces
1 tbsp kosher salt
4 tbsp unsalted butter
12 ounces cremini mushrooms – thinly sliced
1 medium yellow onion – finely chopped
3 cloves garlic – minced
1 tsp thyme leaves
0.25 cup all-purpose flour
2 cups whole milk
0.5 cup vegetable broth
1 tsp soy sauce
0.5 tsp black pepper
0.75 tsp kosher salt
Instructions
Heat the oven to 375°F with a rack in the center. Bring a large pot of water to a boil.
Make the crispy onions: In a large bowl, toss the 2 large thinly sliced yellow onions with 1 cup all-purpose flour, 0.75 tsp kosher salt, and 0.5 tsp black pepper until evenly coated. Heat 2 cups neutral oil in a Dutch oven or deep skillet to 350°F over medium-high heat, 5–7 minutes. Fry the onions in 2–3 batches, stirring, until deep golden, 3–4 minutes per batch. Transfer to paper towels to drain and cool, 5 minutes.
Blanch the beans: Salt the boiling water with 1 tbsp kosher salt, add 2 pounds green beans, and cook until tender-crisp and bright green, 4–5 minutes. Drain and rinse under cold water until cool, 1 minute; pat dry.
Make the sauce base: Melt 4 tbsp unsalted butter in a large skillet over medium heat until foaming, about 1 minute. Add 12 ounces sliced cremini mushrooms and 1 medium finely chopped yellow onion; cook, stirring occasionally, until the mushrooms brown and their liquid evaporates and the onion is translucent, 8–10 minutes. Add 3 minced garlic cloves and 1 tsp thyme leaves; cook until fragrant, 1 minute.
Thicken the sauce: Sprinkle 0.25 cup all-purpose flour over the vegetables and cook, stirring, 1 minute. Gradually whisk in 2 cups whole milk and 0.5 cup vegetable broth, then add 1 tsp soy sauce, 0.5 tsp black pepper, and 0.75 tsp kosher salt. Simmer, stirring, until the sauce bubbles gently and thickens enough to coat a spoon, 4–6 minutes.
Bake the casserole: Fold the drained green beans into the sauce, then transfer to a 3-quart (9×13-inch) baking dish. Bake at 375°F until bubbling around the edges, 15–20 minutes.
Finish and serve: Top evenly with the crispy onions and return to the oven until the top is deep golden and crisp, 8–10 minutes. Let rest 5 minutes before serving warm.