Preheat the oven to 400F.
Rinse the green beans in cold water. Trim off the ends and cut in half. Bring 4 cups of water to a boil. Add green beans and boil them for 5 minutes. Remove from heat and immediately strain the green beans through a colander. Transfer to an ice bath to stop the green beans from continuing to cook. Set aside.
Heat olive oil in a 10" skillet over medium heat. Add garlic and mushrooms, stirring occasionally, for 5 minutes, until the mushrooms have begun to release their juices. Stir in the flour and cook for an additional minute.
Add vegetable stock and non-dairy milk. Bring to a boil and reduce heat to a simmer. Simmer for 5-7 minutes until the sauce begins to thicken. Stir in vegan parmesan, salt, and pepper. Taste and adjust seasoning.
Stir in the green beans until they are fully incorporated. Top with crispy onions and bake for 12-15 minutes until the sauce underneath starts to boil up. Remove from oven and let cool 5 minutes before serving.