Preheat oven to 375°F (190°C) and move the rack one space above the middle. Lightly grease a 9" x 13" casserole dish with butter or cooking spray and set aside.
Place the thawed green beans in a large microwave-safe bowl, I use an 8 cup Pyrex batter bowl, and cook for 3 minutes on high. You want them to have a crisp-tender texture. (If you don't have a microwave, boil the green beans in water for 2-3 minutes, drain and transfer to a large bowl.)
Melt 2 tablespoons of butter in a large skillet over medium-high heat. Add the mushrooms and cook until they have softened. Transfer them to the bowl of green beans along with 1 cup of fried onions.
Melt the remaining 2 tablespoons of butter in the skillet and add the flour. Use a whisk to mix the butter and flour into a paste. Allow it to cook 2-3 minutes while whisking until it turns a very light golden brown. Add ½ cup chicken stock and whisk until the mixture is smooth. (Adding this small amount of liquid in this step will prevent clumps when you add the remaining liquid.)
Add the remaining chicken stock, heavy cream, parmesan cheese, garlic powder, salt and pepper and whisk until it starts to bubble and thicken, 4-5 minutes. Pour the sauce into the bowl of green beans and stir to combine the ingredients.
Transfer the mixture to the casserole dish and top evenly with the remaining 1 ½ cups of fried onions. Bake for 30 minutes or until bubbly and golden brown on top.