Preheat the oven to 190 degrees Celsius and lightly grease a 23 by 33 centimeter baking dish.
Bring a large pot of salted water to a boil. Add the green beans and blanch for 4 minutes until bright green and crisp-tender. Drain immediately and rinse under cold water, then set aside to drain well.
Heat the olive oil and 1 tablespoon of the butter in a large skillet over medium-high heat. Add the mushrooms and cook for 8 to 10 minutes, stirring occasionally, until they release their moisture and become browned around the edges.
Add the remaining 2 tablespoons butter and the diced onion to the skillet. Cook for 4 minutes until the onion softens, then add the garlic and cook for 30 seconds until fragrant.
Sprinkle the flour over the mushroom mixture and stir constantly for 1 minute to coat everything evenly. Slowly pour in the milk, vegetable broth, and heavy cream while stirring to prevent lumps.
Add the salt, black pepper, and nutmeg. Simmer the sauce over medium heat for 4 to 5 minutes, stirring often, until slightly thickened and creamy enough to coat a spoon.
Remove the skillet from the heat and stir in 120 grams of the shredded Gruyere until melted. Fold in the drained green beans and mix until evenly coated.
Transfer the mixture to the prepared baking dish and spread it into an even layer. In a small bowl, combine the remaining 50 grams Gruyere with the panko breadcrumbs and parsley, then sprinkle the topping evenly over the casserole.
Bake for 20 to 22 minutes until hot and bubbling around the edges. If needed, broil for 1 to 2 minutes at the end to deepen the golden color on top, watching carefully to prevent burning.
Let the casserole rest for 5 minutes before serving so the sauce can settle slightly and the portions hold together better.