Preheat the oven to 400 degrees and grease a 9×13 baking dish – if using a round baking dish, make sure it can hold 3 quarts.
Melt 2 tablespoons of vegan butter in a large pot over medium heat. Add the onions, garlic, thyme and a pinch of salt & pepper to the pot and stir to combine. Cook, stirring frequently, until the onions are tender (approx. 40 minutes). If the onions start to char at any point, turn down the heat.
Meanwhile, melt the remaining 4 tablespoons of butter in a skillet over medium heat. Add the flour and whisk for 3-5 minutes, or until it is smooth and bubbly & has a nutty smell. Slowly pour in the broth and whisk until smooth. Pour in the milk and cream cheese and whisk until smooth. Season with salt & pepper to taste.
Add a little sauce to the bottom of the baking dish. Layer half of the potatoes, pour over half of the remaining sauce and then top with half of the onions and half of the mozzarella. Repeat the layers with the rest of the potatoes, sauce, onions & cheese.
Cover with foil and place in the oven for 40 minutes. Remove the foil and cook for another 30-40 minutes. The potatoes should be fork tender and the top should be slightly crispy. Remove from the oven and allow to rest for 10 minutes.
Top with fresh chives and enjoy!
Video
Notes
If you peel and slice the potatoes ahead of time be sure to place them in a bowl of ice water so they don't turn brown.
Be sure to check that the potatoes are cooked all the way through before removing from the oven - the cook time will vary depending on how thick you cut them.
To make ahead: Bake the casserole, cool completely and place in the fridge. Reheat at 350 degrees for 30 minutes.
It is best to use a mandoline or very sharp knife to slice the potatoes.
Please be sure to use unsweetened milk! These will not turn out well if vanilla is in the mix.