Line a large baking sheet with parchment paper. Slightly spray the paper with olive oil. Set aside.
In a large mixing bowl, combine sliced onions with 2 tablespoons olive oil, stir to coat.
Add in almond flour, crushed pork rinds, garlic powder and salt. Toss onions using your hands to evenly coat with the dry ingredients.
Spread the onions onto the baking sheet, make sure they don't overlap, they will be crispier!
Bake for 15-20 minutes and toss with tongs every 6-8 minutes to crisp evenly.
When the onions are crispy, remove from the oven, keep on the tray and reduce the oven to 350°F (180°C). Meanwhile, cook the green beans.
Cook the green beans
Bring a large pot of water to a boil. Make sure the pot is large enough to fit all the green beans or cook in two batches!
Add the trimmed green beans, you may have to cook them in 2 batches if your pot is not wide enough. Make sure the water boil, before adding the second batch
Cook green beans for 3-4 minutes (per batch) then remove them from the water and place on a sieve to steam out. You can run cold water on the beans to stop the cooking and enhance their green color too.
Cook the mushrooms
In a large skillet, warm the 2 tablespoons butter over medium-high heat.
Once melted, add sliced mushrooms, garlic, salt, and pepper.
Cook mushrooms, stirring often until golden brown and liquid evaporated. It takes about 5 minutes. Transfer mushrooms to a bowl using a slotted spoon. Discard any liquid remaining in the skillet.
Cream of mushroom sauce
In a saucepan, over medium heat, melt 2 tablespoons butter with cream cheese, heavy cream, and chicken stock
Stir to melt the cream cheese and form a thick creamy sauce. You may have to use a whisk to dissolve the cream cheese easily.
Season with salt, pepper, and garlic powder.
When the sauce has no lumps, switch to low heat, stir in shredded parmesan and cook until melted and sauce slightly thicken like a regular cream of mushroom. The sauce shouldn't be runny, slightly thick and cheesy. However, if you like your sauce thicker sprinkle the teaspoon of xanthan gum all over the pan, or add a handful extra shredded cheese like mozzarella or shredded parmesan, return to heat for 1 minute, stir to thicken.
Stir in the cooked mushrooms to flavor the creamy sauce and form the cream of mushrooms.
Assemble the keto casserole
Oil a large baking dish 9 x 13 inches with olive oil or butter.
Add in the cooked green beans, 1/2 cup of crispy onion, and pour the cream of mushrooms. Toss to combine.
Tent the dish with a large piece of foil and bake for 25-30 minutes.
Remove foil, add the remaining crispy onions and bake for an extra 5-10 minutes.