Heat the oven to 375°F (190°C). Butter a 2-quart baking dish.
Boil the green beans in salted water for 5 minutes. Drain, rinse with cold water and pat dry.
Melt the butter in a large skillet over medium-high heat. Cook the mushrooms for 6 to 7 minutes until browned. Add the garlic and cook for 30 seconds.
Stir in the flour for 1 minute. Slowly stir in the broth, then the milk. Simmer for 4 to 5 minutes until thick. Season with salt and pepper.
Off the heat, stir in the green beans and 1/2 cup of the fried onions. Spread in the baking dish.
Bake for 20 minutes until bubbling. Top with the remaining 1 cup of fried onions and bake 5 minutes more.