Preheat your oven to 375 degrees F.
Prepare an 8x8 dish for baking with a light coating of cooking spray or vegan butter, set aside.
Bring a large pot of water to a boil. Add the green beans until desired tenderness, about 7-10 minutes. Drain and set aside.
While the green beans are boiling, heat the oil in a large frying pan over medium heat. Add the onions, garlic, and mushrooms and cook until they're tender.
Add the salt, pepper, and flour and stir until the vegetables are coated. Cook for two more minutes.
Slowly pour in the vegetable broth and milk, whisking constantly to incorporate. Cook for about 10 minutes or until the liquid is thick and bubbly.
Once the mixture is thick and bubbly, stir in 1 cup of the crispy fried onions and the cooked green beans. Taste the mixture and add more salt and pepper if needed.
Pour the green beans and sauce mixture into the prepared baking dish and top with the remaining 1 cup of crispy onions. You can use a large casserole or mini cassolettes.
Bake the green bean casserole in a preheated oven for 15-20 minutes or until the casserole is lightly browned and bubbling on top. If using mini cassolettes reduce the cooking time to 8-10 minutes depending on the size.