Bring a large pot of salted water to a boil. Add green beans and blanch for 4 to 5 minutes until just tender but still crisp. Drain and immediately plunge them into a bowl of ice water. This locks in their colour and texture. Set aside.
In a large frying pan, melt butter over medium heat. Add chopped onion and cook for 2 to 3 minutes until softened. Stir in the minced garlic and cook for another 30 seconds until fragrant.
Add chopped mushrooms to the pan. Sauté for 6 to 8 minutes, stirring occasionally, until the moisture has evaporated and mushrooms are nicely browned. Proper browning enhances the umami depth of the sauce.
Sprinkle flour over the mushrooms and stir continuously for 1 minute to cook off the raw flour taste. Gradually add the milk and cream, stirring to avoid lumps. Simmer gently until the sauce thickens, about 3 to 5 minutes.
Stir in soy sauce, salt, black pepper, and nutmeg if using. Taste and adjust seasoning. The sauce should be rich and savoury, not bland.
Drain the cooled beans and pat dry. In a large mixing bowl, combine beans with the mushroom cream sauce. Toss gently to coat evenly without breaking the beans.
Transfer the green bean mixture into a greased baking dish (roughly 20x20cm). Use a spatula to smooth out the top, pressing lightly to compact the filling.
Sprinkle half of the crispy fried onions over the top. This ensures they don’t overcook during baking but still develop flavour.
Place the dish in a preheated oven at 180°C (fan 160°C) and bake for 20 to 25 minutes, or until bubbling around the edges.
Remove the casserole and top with the remaining fried onions. Return to the oven for another 5 minutes until golden and crisp. Serve hot with roasted meats or stuffing. It pairs wonderfully with cranberry sauce or turkey gravy for a classic presentation.