Preheat Oven: Preheat your oven to 350°F (175°C). Lightly grease a 9×13-inch baking dish with butter or oil and set aside.
Blanch the Green Beans: Bring a large pot of salted water to a boil. Add the green beans and cook for 5-6 minutes, until crisp-tender and bright green. Drain and immediately transfer to an ice bath to stop the cooking. Once cooled, drain thoroughly and pat dry with paper towels.
Prepare the Onions: Add 1 cup of buttermilk and 1 large thinly sliced onion to a medium bowl. Gently coat the onions in the buttermilk and let them soak for a few minutes. In a separate shallow dish, combine the 1 cup of all-purpose flour, ½ teaspoon garlic powder, ½ teaspoon paprika, ½ teaspoon salt, and ¼ teaspoon pepper.
Dredge and Fry the Onions: Heat 1-2 inches of oil in a deep skillet to 350°F. Working in batches, remove the onions from the buttermilk, dredge in the flour mixture, and shake off any excess. Fry for 2-3 minutes, until golden and crisp. Transfer to a paper towel-lined plate or wire rack and season with a pinch of salt. Set aside.
Sauté the Mushrooms: In a large skillet over medium heat, melt 4 tablespoons of butter. Add the sliced mushrooms and minced garlic; sauté for 6-8 minutes, until the mushrooms are browned and have released their liquid.
Make the Sauce: Sprinkle the cooked mushrooms with 4 tablespoons of all-purpose flour. Cook, stirring constantly, for 1 minute. Gradually whisk in the 1 cup of chicken or vegetable broth until smooth, followed by 1 cup of half-and-half. Season with 1 teaspoon fresh thyme, ½ teaspoon salt, and ½ teaspoon pepper. Simmer for 3-4 minutes, until thickened and creamy.
Assemble the Casserole: Gently fold the drained green beans into the mushroom sauce, coating evenly. Transfer the mixture to the prepared baking dish and smooth the top. Sprinkle the crispy onions evenly over the top.
Bake uncovered for 20-25 minutes, or until hot and bubbling around the edges.
Rest and Serve: Remove from the oven and let rest for 10 minutes before serving.