- Preheat oven to 400°F. Coat a 2 1/2-quart baking dish with cooking spray.
- Heat 1 tablespoon oil in a large saucepan over medium heat. Add diced onion and cook, stirring often, until softened and slightly translucent, about 4 minutes.
- Stir in mushrooms, onion powder, 1 teaspoon salt, thyme and pepper.
- Cook, stirring often, until the mushroom juices are almost evaporated, 3 to 5 minutes.
- Sprinkle 1/3 cup flour over the vegetables; stir to coat.
- Add milk and sherry and bring to a simmer, stirring often.
- Stir in green beans and return to a simmer.
- Cook, stirring, until heated through, about 1 minute.
- Stir in sour cream and buttermilk powder.
- Transfer to the prepared baking dish.
- Whisk the remaining 1/3 cup flour, paprika, garlic powder and the remaining 1/4 teaspoon salt in a shallow dish.
- Add sliced onion; toss to coat.
- Heat the remaining 2 tablespoons oil in a large nonstick skillet over medium-high heat.
- Add the onion along with any remaining flour mixture and cook, turning once or twice, until golden and crispy, 4 to 5 minutes. Spread the onion topping over the casserole.
- Bake the casserole until bubbling, about 15 minutes. Let cool for 5 minutes before serving.