01 - Preheat the oven to 375°F. Lightly grease a 9x13-inch baking dish with butter or cooking spray.
02 - Bring a large pot of salted water to a rolling boil. Add the green beans and blanch for 4 minutes until crisp-tender. Drain and immediately transfer to an ice bath to stop the cooking process. Drain again and set aside.
03 - In a large skillet over medium heat, melt the butter. Add the chopped onion and cook for 2 minutes until softened. Add the garlic and mushrooms; sauté for 5-6 minutes until the mushrooms release their moisture and begin to brown lightly.
04 - Sprinkle the flour over the vegetable mixture and stir constantly to coat; cook for 1 minute to remove raw flour taste. Gradually pour in the vegetable broth while stirring. Add the milk and heavy cream; bring to a gentle simmer. Cook for 4-5 minutes, stirring frequently, until the sauce thickens enough to coat the back of a spoon.
05 - Stir in the salt, pepper, nutmeg, and soy sauce for umami depth. Remove the skillet from heat.
06 - Add the blanched green beans and half of the crispy fried onions to the thickened sauce. Fold gently until the beans are evenly coated.
07 - Transfer the green bean mixture to the prepared baking dish, spreading it into an even layer. Sprinkle the remaining crispy fried onions evenly over the top.
08 - Bake uncovered for 20-25 minutes until the sauce is bubbling around the edges and the onion topping is golden brown and crispy.
09 - Allow the casserole to rest for 5 minutes before serving to let the sauce set slightly for easier serving.