While the onions are cooking, prepare your green bean mixture. Bring a large pot of water to a boil and add 1 Tbsp of salt.
Add the green beans and boil for 7-9 minutes or until the green beans are tender, then quickly rinse under cold water. Keep green beans in a colander in the sink for now.
Heat olive oil in a large saucepan over medium heat and add the mushrooms. Cook, stirring frequently, for about 7-8 minutes or until mushrooms are tender.
Sprinkle the flour over the mushrooms and stir until the flour is evenly dispersed.
Then slowly add the milk and bring the mixture to a boil. Let it simmer for 10 minutes, stirring frequently, until it becomes a thick gravy.
Stir in the mayo, dijon, balsamic glaze, ranch seasoning mix, salt and pepper.
Spray 9x13-inch dish with cooking spray. Spread 1/3 of the sauce into the baking dish.
Layer with green beans and top with the remaining sauce. Sprinkle the cheese and onions on top and bake, covered with foil, for 15 minutes.
Uncover and bake for another 10-15 minutes. If the onions start to brown too much, cover the dish back with foil. Serve hot and enjoy!