Preheat the oven to 400°F.
Bring a large pot of salted water to a boil. Fill a large bowl with ice water.
Add the green beans to the boiling water and cook for 3 minutes. Drain the green beans and immediately transfer them into the ice water. Drain the beans well and set them on paper towels or a kitchen towel to remove any excess moisture.
Add the butter to a 10- or 12-inch ovenproof skillet set over medium heat. Once the butter has melted, add the mushrooms and cook, stirring, until softened and the mushrooms have released liquid, about 5 minutes. Add the garlic and cook, stirring, until golden brown, about 2 minutes.
Stir in the flour then add the chicken broth, soy sauce and 1/2 teaspoon black pepper. Increase the heat to medium-high and simmer the sauce for 3 minutes.
Decrease the heat to medium-low then whisk in the half-and-half. Cook the sauce, stirring occasionally, until it’s thick enough to coat the back of a spoon, 6 to 8 minutes.
Remove the skillet from the heat. Stir in the green beans and 1 cup of the crispy fried onions.
Sprinkle the remaining 2 cups of crispy fried onions on top and bake until the casserole is bubbling, 10 to 12 minutes.
Remove the casserole from the oven, let cool slightly then serve.