Bring a large pot of salted water to a boil. Add the trimmed green beans and cook for about 5 minutes until they are bright green and tender-crisp. Immediately drain the beans and plunge them into a bowl of ice water to stop the cooking process. This helps keep them vibrant and prevents them from becoming mushy in the oven.
In a large skillet, heat the olive oil over medium heat. Add the sliced mushrooms and cook for about 7 to 8 minutes until they have released their moisture and turned golden brown. Stir in the minced garlic and cook for another minute until fragrant, being careful not to let the garlic burn.
Sprinkle the flour over the mushroom mixture and stir well to coat the vegetables, cooking for 1 minute to remove the raw flour taste. Slowly whisk in the vegetable broth followed by the unsweetened plant milk. Continue to simmer the mixture, stirring frequently, until the sauce thickens into a creamy consistency. Season with onion powder, salt, and black pepper.
Preheat your oven to 350 degrees Fahrenheit. In a large baking dish, combine the blanched green beans, the creamy mushroom sauce, and half of the crispy fried onions. Toss everything gently until the beans are well coated. Spread the mixture evenly in the dish and bake for 20 minutes.
Remove the casserole from the oven and sprinkle the remaining crispy fried onions over the top. Return the dish to the oven for an additional 5 to 10 minutes, or until the sauce is bubbling and the onions are a deep golden brown. Let the dish rest for a few minutes before serving to allow the sauce to set.