Make the topping: Separate the onion strips and soak in the buttermilk at least 10 minutes. Heat 2 inches of vegetable oil in a large pot or Dutch oven over medium heat until a deep-fry thermometer registers 360 degrees F. Combine the flour, panko, parsley and 1 teaspoon salt in a medium bowl. Working in batches, remove the onion strips from the buttermilk, dip in the flour mixture and fry until golden brown and crisp, about 3 minutes. Transfer to a paper towel-lined plate; season with salt.
Make the casserole: Bring a large pot of salted water to a boil. Add the green beans; cook until crisp-tender, about 6 minutes. Drain, rinse under cold water and blot dry with paper towels.
Preheat the oven to 375 degrees F. Melt the butter in a large pot over medium-high heat. Add the mushrooms, season with salt and cook, stirring occasionally, until lightly browned and tender, about 7 minutes. Add the garlic and thyme; cook 1 minute. Add the flour and stir to coat, 1 minute.
Whisk in the half-and-half, chicken broth, cayenne and 1/2 teaspoon salt. Bring to a simmer and cook, whisking occasionally, until slightly thickened, about 5 minutes. Stir in the parmesan and green beans. Transfer to a 3-quart baking dish. (You can refrigerate the casserole, covered, for up to 4 hours; keep the topping at room temperature.)
Bake the casserole until bubbling, about 15 minutes. Stir, then sprinkle with the topping; bake until warmed through, 5 more minutes.
Photograph by Ryan Dausch
Courtesy of Food Network Magazine