Place the rinsed and trimmed green beans into the prepared casserole dish. Set aside.
Heat the olive oil in a large saucepan set over medium/high heat. When the oil is fragrant, add the mushrooms and 1/8 teaspoon of salt. Sauté for 4-6 minutes. Remove the mushrooms from the heat and transfer to a separate bowl. Set aside.
In the same saucepan, prepare the roux. Melt the butter over medium/high heat. Add the flour to butter and mix until a thick paste forms.
Slowly pour in the milk while continually whisking the milk, butter, and flour together. Whisk until mixture is thick. Remove the saucepan from the heat.
Add the broth, cooked mushrooms, and the remaining 1/8 teaspoon of salt to the roux. Mix well.
Pour the roux over the green beans and toss (directly in the baking dish) so the beans are coated.
Place both the green bean casserole and onions in the oven at the same time.
Bake for 20 minutes. Toss the onions and bake for an additional 20 more minutes.
After 40 minutes, remove the casserole from oven. For extra crispy onions, turn the oven to high broil and broil the onions for 3-5 minutes.*
Once onions are crunchy, use a spatula to gently transfer onions to top the green bean casserole. Serve warm.