To Make The Casserole:Begin by preparing the onion topping. Then make the mushroom sauce.While those are cooking, preheat oven to 375 degrees and bring a large stockpot of water to a boil. Add the green beans and boil for 3-5 minutes, or until they reach your desired level of doneness. (I like mine cooked but still slightly crispy.) Drain the green beans, then transfer them to the bowl of ice water and stir them in. This will stop them from cooking more.When the mushroom sauce is ready, transfer the green beans into the pan with the sauce and toss until combined. Pour the green bean mixture into a baking dish that has been greased with cooking spray. Then sprinkle the onion topping evenly on top. Bake for 25 minutes. Serve warm.To Make The Crispy Onion Topping:Heat half of the butter in a large saute pan over medium-high heat until melted. (Or if using olive oil, heat until it is shimmering.) Add the onions and saute, stirring occasionally, for about 5 minutes or until they are soft and starting to brown around the edges. Use a slotted spoon to transfer the onions to a separate mixing bowl.Add the remaining half tablespoon of butter (or oil) to the pan and heat until melted. Add in the Panko breadcrumbs and stir until combined. Cook, stirring once every 30 seconds or so, for about 3-5 minutes until the Panko is toasted and lightly golden. Remove from heat and transfer the Panko to the bowl with the onions. Stir in the Parmesan and salt, and toss the mixture until combined. Set aside.To Make The Mushroom Sauce:In the same saute pan that you used to cook the onion and Panko, heat butter in a large saute pan over medium-high heat until melted. (Or if using olive oil, heat until it is shimmering.) Add mushrooms and saute for 3-5 minutes until they are soft and cooked, stirring occasionally. Add the garlic and saute for an additional 1-2 minutes until fragrant, stirring occasionally. Sprinkle with flour, and stir to combine. Saute for an additional minute to cook the flour, stirring occasionally.Slowly add chicken broth, whisking to combine until smooth. Whisk in milk, and bring the mixture to a simmer. Let cook for an additional minute until thickened, then stir in Parmesan cheese, salt and pepper until the cheese is melted. Reduce heat to low until the sauce is ready to be tossed with the green beans.(*If the sauce seems too thick, you can add in an extra 1/2 cup of milk. If the sauce is too thin, you can add in an extra 1/4 cup of Parmesan cheese.)