Preheat oven to 350°
Melt butter in a large, oven safe skillet over medium heat.
While butter is melting prep leek, onion and garlic. Trim the dark green part from the leek and discard (or save for bone broth!). Quarter and slice the remaining leek into very thin ribbons. Dice the yellow onion and mince the garlic. Add alliums to to melted butter with a generous pinch of coarse sea salt.
Saute onions and garlic until fragrant and onions soften, about 5 minutes.
While onions are cooking, thinly slice mushrooms, removing any tough stem pieces. Add sliced mushrooms to onion mixture along with another pinch of coarse sea salt.
Satue until mushrooms release moisture and start to brown; about 7-10minutes. The mushrooms and onions should absorb most of the butter and cooking liquid. Remove 1/3 of the onion and mushroom mixture from the pan and set aside.
Deglaze the pan with 1 cup chicken stock, scraping the pan to get any stuck browned bits.
Add 1.5 cups heavy cream, 1 tsp salt, 1/4tsp pepper, and 1 tsp thyme to pan and reduce the heat. Allow to simmer for 10-15 minutes.
While cream sauce is simmering, prep green beans. Trim ends of green beans, discard, and cut beans into 2" pieces.
Blanche green beans in a pot of boiling water for 2-3 minutes until bright green. Drain water and set beans aside.
Using an immersion blender, puree the cream sauce. If your pan is too shallow, transfer the sauce to a quart size mason jar and puree in there.
Taste the sauce for salt and adjust to your preference
Add green beans, reserved mushrooms and onions and cream sauce back to oven safe skillet (or glass baking dish if you don't have an oven safe skillet). Stir to make sure green beans are evenly distributed.
Bake for 30 minutes.
Remove casserole from oven and sprinkle with 4-5 tbsp grated parmesan. Turn oven to broil and return casserole to oven for another 3-5 minutes. Broil until parmesan bubbles and browns.
Remove from oven and allow to cool 5-10 minutes before serving.