Preheat oven to 350°F. Grease a 9x9-inch pan with cooking spray. Peel potatoes and dice into 1/2-inch pieces. Tightly pack potatoes in measuring cups to ensure a full 5 cups.
Melt butter in a large nonstick pot over low heat. Add garlic powder, mustard powder, onion powder, salt, and pepper. Sauté for 1 minute or until fragrant. Sprinkle in flour and whisk constantly for 1 minute until smooth; do not let it brown. Gradually pour in 1 cup milk while whisking constantly. Once smooth, increase heat to medium-high and add the other cup of milk gradually. Stir occasionally until the mixture comes to a boil.
Once boiling, reduce heat to medium-low and stir constantly for 2 minutes or until thickened (see note 4). Remove from heat and let cool for 2 minutes. Stir in 1 cup Cheddar cheese until melted and smooth. Add diced potatoes and stir to coat. Mix in fresh thyme if using.
Add 1/3 of the potatoes to the prepared pan and sprinkle with 1/2 cup Cheddar cheese. Repeat with another 1/3 of the potatoes and 1/2 cup of cheese. Top with remaining potatoes, smoothing to an even layer. Cover with foil and bake for 1 hour and 15 minutes.
Melt 2 tablespoons of butter in a large skillet over medium-high heat. Add panko and 1/4 teaspoon salt. Stir constantly until lightly browned, then remove from heat and set aside.
Remove foil and pierce the center of the pan with a table knife to check if the potatoes are tender. If not, bake for 5–10 more minutes and check again. Remove from oven and gently stir the potatoes with a spatula, then smooth into an even layer. Sprinkle with the remaining 1/2 cup Cheddar cheese and the panko topping. Bake for another 10–15 minutes, until golden and bubbly. Remove and let stand for 5–10 minutes before serving. The sauce will thicken as it stands. Enjoy!
Video
Notes
Note 1: Yukon gold potatoes are my favorite. Russet potatoes will also work. Peel, rinse, and cut into 1/2-inch cubes.Note 2: Whole milk delivers the richest result. 2% and 1% milk will work, but I do not recommend skim milk or plant-based alternatives.Note 3: Freshly shred the cheese for the best melting. Pre-shredded cheese has a powdery coating that can affect melting. Use sharp or extra-sharp Cheddar for enough flavor; mild Cheddar will leave the sauce lacking.Note 4: The sauce should coat the back of a wooden spoon. Trace a line across the back with your fingertip. If the line stays clear, the sauce is thick enough. If not, cook a bit longer.Storage: Serve cheesy potatoes hot for the best texture, as the topping softens when cooled and the potatoes absorb more sauce. Store in the fridge for 5–7 days, though the topping will lose its crunch; add topping only to the portion you plan to eat immediately. Leftovers can be frozen in an airtight container for up to 2–3 months.