Prep the cashews: If not soaked overnight, use the quick boil method by adding cashews to a small pot, covering with water, and boiling for 10 minutes. Drain and set aside.
Preheat the oven to 375°F (190°C). Grease a 9×13-inch baking dish lightly with oil or cooking spray.
Make the cashew sauce: Blend soaked cashews, plant-based milk, nutritional yeast, garlic, lemon juice, ½ teaspoon of salt, and a pinch of pepper on high until smooth. Adjust seasoning as needed.
Slice the potatoes: Use a mandoline or sharp knife to slice potatoes into thin rounds, about ⅛ inch thick.
Layer the potatoes and sauce: Arrange a layer of potato slices in the baking dish, slightly overlapping. Sprinkle sliced onion on top, then pour a layer of cashew sauce. Repeat until all potatoes and sauce are used, finishing with a layer of sauce. Sprinkle fresh thyme on top if desired.
Bake: Cover the dish with aluminum foil and bake for 40 minutes. Uncover and bake for another 10-20 minutes, or until the top is golden and bubbly. Potatoes should be fork-tender and sauce thickened.
Cool and serve: Let the dish cool for 10-15 minutes before serving to allow the sauce to firm up.
