Prepare the oven and green beans. Preheat the oven to 375°F (190°C). Bring a large pot of salted water to a boil. Add the green beans and cook for 4 to 5 minutes, until bright green and just tender. Drain well and set aside.
Cook the mushrooms. Melt the butter in a large skillet over medium heat. Add the sliced mushrooms and cook for 6 to 8 minutes, stirring occasionally, until they release their moisture and begin to turn golden brown. Add the minced garlic and cook for another 30 seconds, until fragrant.
Make the creamy sauce. Sprinkle the flour over the mushrooms and stir until evenly coated. Cook for 1 to 2 minutes to remove the raw flour taste. Gradually whisk in the vegetable broth, followed by the milk, until the mixture is smooth. Add the soy sauce, salt, black pepper, and nutmeg.
Simmer until thickened. Cook the sauce over medium-low heat for 3 to 5 minutes, stirring frequently, until it thickens enough to coat the back of a spoon. Taste and adjust the seasoning as needed.
Combine the casserole. Add the drained green beans and 1 cup of the crispy fried onions to the skillet. Stir gently until the beans are evenly coated in the mushroom sauce. Transfer the mixture to a 2-quart casserole dish and spread it into an even layer.
Bake until bubbly. Place the casserole in the preheated oven and bake for 15 minutes, until the sauce is bubbling around the edges and the beans are heated through.
Add the crispy topping. Sprinkle the remaining 1/2 cup of fried onions evenly over the casserole. Return it to the oven for another 5 to 8 minutes, until the topping is golden and crisp.
Rest and serve. Let the casserole rest for about 5 minutes before serving. This allows the sauce to settle slightly while keeping the onion topping crisp.