Bring a large pot of salted water to a boil. Blanch green beans for 5 minutes until bright green, then transfer to ice water. Drain and pat dry.
Mushroom Sauce & Topping
Preheat oven to 400°F (205°C). In a large skillet over medium heat, melt butter. Add diced onion and mushrooms; sauté 5 minutes until tender.
Stir in minced garlic and cook 30 seconds. Sprinkle flour and cook 1 minute while stirring.
Gradually whisk in chicken broth and milk until smooth. Season with soy sauce and pepper; simmer 3–4 minutes until thickened.
Fold blanched beans into sauce and transfer to a 2-quart baking dish. Top with 1 cup of fried onions.
Bake for 15 minutes until bubbly around the edges. Sprinkle remaining onions and bake 5 minutes more until golden.
Notes
Through multiple tests, I learned that an ice bath is crucial to lock in bean color and texture.Allow leftovers to rest uncovered for 10 minutes before reheating to maintain a crisp topping.For long-term storage, freeze assembled casserole (without onions) for up to 2 months, then bake straight from frozen, adding extra time.