Preheat your oven to 375°F (190°C).
Heat a generous amount of salted water in a large pot until it begins to boil. Add the green beans and cook for about 5 minutes, until they are bright green and tender-crisp. Drain the beans and immediately plunge them into a bowl of ice water to stop the cooking process. Set aside.
In a saucepan of medium size, allow the butter to melt over medium heat. Add the sliced mushrooms, salt, and black pepper. Cook for about 5 minutes, until the mushrooms release their liquid and start to brown.
Add the minced garlic to the mushrooms and cook for an additional 1 minute.
Dust the mushroom mixture with flour and stir thoroughly to evenly coat. Cook for 1 minute, stirring constantly.
Slowly pour in the chicken broth, whisking constantly to prevent any lumps from forming. Add the heavy cream and continue whisking until the mixture is smooth and thickened about 5 minutes.
Drain the green beans and transfer them to a large mixing bowl. Pour the mushroom sauce over the beans and stir gently to combine.
Move the green bean mixture into a baking dish that has been greased. Spread the crispy fried onions evenly over the top of the casserole.
Place aluminum foil over the dish and bake for a duration of 20 minutes. Remove the foil and bake for an additional 10 minutes, or until the onions are golden brown and the casserole is bubbling.
Remove the casserole from the oven and let it cool for a few minutes before serving.