Bring a gallon of water and 1 Tablespoon of salt to a boil in a large saucepan. Add the beans and blanch for 5 minutes. Drain and immediately place into a large bowl filled with ice water to stop the cooking process. Drain again and set aside.
Over medium-high heat, melt the butter in a large 10- to 12-inch ovenproof skillet. Add the mushrooms, 1 teaspoon salt, and the pepper. Cook, stirring occasionally, until the mushrooms begin to give off some of their moisture—about 5 minutes. Add the garlic, stir, and cook for another 2 minutes. Sprinkle the flour on top and stir until combined. The flour will soak up all the moisture. Add the chicken broth and simmer for 3 minutes. Decrease the heat to medium-low and add the half-and-half. Stirring occasionally, cook until the mixture is thick—about 10 minutes or maybe more if you prefer a thicker sauce.
Remove from the heat and add around ¼ of the onions and all of the green beans. Give it a nice stir, combining the sauce and beans. Top with remaining onions and bake until bubbly, about 10-15 minutes. Remove from the oven and serve warm.
Leftovers keep well in an airtight container in the refrigerator for up to 4 days. Reheat as desired.
