In a large sauté pan over medium heat, melt the butter. Add the mushrooms and garlic and cook while stirring for 2 to 3 minutes.
Sprinkle in the flour and stir vigorously for 1 to 2 minutes, being careful not to let the flour burn. Stir in the salt and pepper.
Carefully whisk in the milk and soy sauce while scraping the brown bits off the bottom of the pan. Bring to a light boil. Whisk and cook until the sauce thickens to the consistency of a really thick soup, about 3 to 4 minutes.
Mix the sauce with the (previously steamed) green beans in a casserole dish and toss to combine. Bake in the oven until bubbly, about 15 minutes. Remove from oven and top with French Fried Onions (instructions below).
French Fried Onion Topping Instructions
While the casserole is baking, spread the flour out on a large plate, carefully separate the onion pieces, and dredge them in the flour until they are evenly coated.
Melt the butter for the topping in a large sauté pan over medium heat. Shake the excess flour off the onions and add them to the pan, being careful not to overcrowd the pan. Depending on the size of the pan you may need to cook them in batches. If cooking more than one batch, be sure to wipe out the pan in-between to prevent the residue from burning.
Once the onions are golden brown on the bottom (after about 1 to 2 minutes), carefully flip them over to brown the other side. Add extra butter to the pan if they begin to look dry. The onions do cook quickly, so keep a close watch!
Transfer the onions to a paper-towel lined plate and generously season with salt.