Sauté Aromatics & Build the Roux: Preheat oven to 375°F (190°C) and butter a deep 9x13-inch ceramic baking dish. Melt 4 tablespoons (56 g) unsalted butter in a large saucepan over medium heat. Add minced onion and cook 4 minutes until translucent, then stir in minced garlic and 1 tablespoon fresh thyme for 60 seconds. Whisk in 1/4 cup (31 g) flour and cook 90 seconds.
Whisk the Two-Cheese Mornay Sauce: Slowly whisk in 1.5 cups (360 ml) warm whole milk and 1 cup (240 ml) warm heavy cream. Simmer gently for 3 to 4 minutes until thickened. Remove from heat and whisk in 1.75 teaspoons kosher salt, 1/2 teaspoon black pepper, 1/4 teaspoon nutmeg, 3/4 cup (85 g) Gruyère, and 1/2 cup (58 g) sharp white cheddar until melted.
Slice & Shingle the First Potato Layer: Slice the peeled Yukon gold potatoes into 1/8-inch (3 mm) rounds on a mandoline. Arrange half of the un-rinsed potato slices in overlapping shingled rows in the baking dish and pour half of the warm cheese sauce evenly over top.
Layer Top Half & Blanket With Cheese: Shingle the remaining potato slices on top, pour the remaining warm cheese sauce over the potatoes, and scatter evenly with the reserved 3/4 cup (85 g) Gruyère and 1/2 cup (58 g) white cheddar.
Two-Stage Covered & Uncovered Bake: Cover tightly with lightly oiled aluminum foil and bake at 375°F (190°C) for 40 minutes. Remove foil and bake uncovered for 25 to 30 minutes until potatoes are fork-tender and the top crust is deeply golden brown and bubbling.
Rest 15 Minutes Before Serving: Let the gratin rest on a cooling rack for 15 minutes so the creamy layers set into clean slices, garnish with fresh thyme leaves, and serve warm.