In a medium saucepan melt butter over medium-low heat. Stir in garlic and cook for ~2 minutes.
2 tbsp unsalted butter, 3 cloves garlic
Sprinkle the cornstarch over the butter, and whisk to form a paste. Cook down for 3 minutes, stirring often.
1 tbsp cornstarch
Slowly pour in the evaporated milk, whisking constantly to incorporate.
1.5 cups evaporated milk
Increase the temperature to medium and bring the milk mixture to a near boil for 2 minutes, whisking constantly.
Layer half of the potatoes and half of the onions in the bottom of the baking dish. Sprinkle with half the kosher salt, black pepper, thyme, and smoked paprika.
5 cups Yukon gold potatoes, thinly sliced, 1/2 cup white onion, 1.5 tsp kosher salt, 1/2 tsp ground black pepper, 1/4 tsp smoked paprika, 1.5 tsp fresh thyme
Dot with 1 tbsp of cubed butter and pour 1/3 of the milk mixture over the potatoes.
2 tbsp unsalted butter
Layer with the rest of the potatoes, onion, salt, pepper, smoked paprika, thyme, cubed butter, and milk mixture.
Cover tightly with foil and bake covered for 35 minutes. Pro tip: spray the underside of the foil with cooking spray to prevent any potatoes from sticking to it)
Uncover and bake until the potatoes are browned and solid in the middle (~30-35 minutes).
Notes
Potatoes can be peeled or unpeeled.
If you can’t tolerate corn, you can sub in the cornstarch for arrowroot powder or your favorite cup for cup gluten-free flour. If using gluten-free flour, you’ll want to cook it down with the butter for a few extra minutes.
You can use whole milk or half-and-half in place of evaporated milk, but warm it before adding it to the butter/cornstarch mixture to prevent it from curdling.
If you need to make this plant-based, use your favorite dairy-free butter and dairy-free milk. I prefer cashew milk for this kind of dish.