In a skillet over medium heat, add vegan butter and cook until melted. Add the mushrooms and cook until tender, about 3 minutes. Add minced garlic. Stir and cook for about 30 seconds.
Stir together the milk mixture from the onions above, with 1 cup water, and bouillon. Use any leftover flour from the fried onions for a total of 3 tablespoons flour to the milk mixture (supplement with additional flour as needed). Stir to remove any lumps. Pour this over the contents in the skillet and stir to combine.
Add the green beans, stir to coat, and then bring it to a simmer. Add vegan cheese and stir until it melts. Then reduce heat to medium-low and cook for approximately 5 minutes, until the green beans are no longer frozen and slightly tender, but still a little crisp and the sauce has thickened. If the sauce does not thicken, sprinkle another tablespoon of flour over the top and use a spatula to stir it in.
While the green beans simmer, preheat the oven to 375°F/191°C.
Pour the green bean mixture into a 9" square baking dish or casserole dish. Add about 1/2 of the fried onions and stir them throughout. Equally, distribute remaining fried onions over the top. Sprinkle with vegan parmesan. Bake for 20 to 25 minutes.
When done, remove from oven and set aside to cool for 5–10 minutes before serving. Cover and refrigerate any leftovers not eaten right away. These will keep in the fridge for up to 5 days.