Preheat your oven to 375 degrees.
Bring a large pot of water to a boil. Add the green beans and cook until just tender, about 5 to 6 minutes.
Meanwhile, fill a large bowl with ice water. Once the green beans are cooked, drain them and plunge into the ice water.
After a few minutes, drain the green beans well from the ice water. Transfer them to a 12 by 8 or 13 by 9-inch baking dish.
In a large skillet, melt the butter over medium-high heat. Add the sliced mushrooms and season with salt and pepper. Sauté until softened, about 5 minutes.
Add the minced garlic to the skillet and sauté for 1 minute longer.
Sprinkle the flour over the mixture and toss, cooking briefly for about 30 seconds.
Pour in the chicken broth and half and half, stirring to combine. Season to taste with salt and pepper.
Bring the mixture to a simmer, stirring frequently, until the sauce thickens.
Stir in the parmesan cheese until melted.
Pour the sauce over the green beans and toss to coat.
Sprinkle the top with crispy fried onions.
Cover with foil and bake for 10 minutes, then uncover and bake for another 10 minutes.
Serve warm.