Preheat your oven to 350°F.
Fill a medium bowl with the 1/2 cup of almond milk (from the fried onions) and add in the thinly sliced onion, making sure to separate all the rings so they can sit while you make the casserole.
In a large, high-sided frying pan, heat the avocado oil over medium-high heat.
Add in the mushrooms and diced onions and cook until lightly golden brown, about 3-4 minutes.
While the mushrooms and onions cook, fill a large pot with water, adding a pinch of salt, and bring to a boil.
Once boiling, add in the trimmed green beans and cook until fork-tender, about 7-8 minutes. Drain and transfer to a paper towel-lined plate. Try to lightly press out as much of the water as you can. Set aside
Once the mushrooms and onions are cooked, add in 1 cup of the almond milk and 1 cup of the coconut milk (reserving the rest for later) along with the salt and pepper and stir until well combined.
Bring the mixture to a boil. While you're waiting for it boil, whisk together the 2 tablespoons of tapioca starch and the remaining 1 tablespoon of each milk in a small bowl until smooth.
Once the sauce is boiling, stir in the tapioca and milk mixture, stirring constantly. Boil the milk mixture for 4 minutes while stirring.
Reduce the heat to medium and simmer, stirring very frequently, until the mixture is really thick and reduced by half, about 10-11 minutes.
Once the sauce is thick, add in the green beans and stir until evenly coated.
Pour the mixture into an 8x8-inch baking dish and bake until the sides are bubbly and the sauce has further thickened, about 25 minutes.
While the casserole cooks, it's time to make the onions. Heat the avocado oil in a medium saucepan or skillet, over medium-high heat, then reduce to medium. The oil should sizzle when you add the onion, but you don't want it too hot that it burns the onion.
Place the tapioca starch, coconut flour, salt, and pepper into a large Ziploc bag and shake until well mixed.
Drain the onions soaking in almond milk, transfer them to the bag, and gently shake around to evenly coat each ring.
Drop a few rings into the hot oil, making sure not to crowd the pan, and cook until lightly golden brown and crispy, flipping as necessary. I did mine in 4 batches.
Transfer the onions to a paper towel-lined plate and gently blot off the excess oil. Repeat until all the rings are done.
Once the casserole has cooked, scatter the fried onions on top, lightly pressing them into the casserole. Bake for 5 minutes more, then serve.