Preheat your oven to 375°F (190°C).
In a medium saucepan, melt the butter over medium heat. Whisk in the flour and cook for 2-3 minutes, stirring constantly, to create a roux.
Slowly pour in the heavy cream and milk, whisking continuously to prevent lumps from forming. Bring the mixture to a simmer and cook for 5-7 minutes, or until the sauce has thickened.
Remove the saucepan from the heat and stir in the garlic powder, onion powder, dried thyme, salt, and black pepper.
Grease a 9x13-inch (23x33 cm) baking dish with butter or non-stick cooking spray.
Arrange a layer of potato slices in the bottom of the dish, overlapping the slices slightly.
Spoon a third of the béchamel sauce over the potatoes and spread it evenly.
Sprinkle with a third of the cheddar and Parmesan cheeses.
Repeat the layers of potatoes, sauce, and cheeses two more times, ending with the cheese.
Cover the dish with aluminum foil and bake for 45 minutes.
Remove the foil and continue baking for an additional 15-20 minutes, or until the potatoes are tender and the top is golden brown and bubbly.
Let the potato bake rest for 10-15 minutes before serving.