Melt butter in a saucepan over medium-low heat. Let simmer for 1 minute. Add flour, 1 tablespoon at a time, whisking constantly until completely incorporated, 5 to 8 minutes. Add 1 cup water slowly and whisking constantly to avoid clumping. Remove from heat.
Whisk remaining 2/3 cup water together with cornstarch in a small bowl. Add slurry to the gravy; whisk to combine.
Preheat the oven to 375 degrees F (190 degrees C).
Stir the gravy briefly; season with salt and pepper. Add thyme and rosemary. Stir in Swiss cheese and Gruyere cheese. Add potatoes, scallions, and garlic; stir well until potato slices are separated and coated with gravy. Pour mixture into an 8-inch square baking dish.
Bake in the preheated oven until potatoes are tender, 40 to 50 minutes.
All-purpose flour can be substituted for the whole wheat if desired.
Top with bread or cracker crumbs after the first 20 minutes of baking if you like.
Baking time will mostly depend on how thinly you sliced your potatoes. To check doneness, stick one with a fork; if it pierces the potato with no resistance, it’s done. (I like my potatoes with a little bite, so I cook mine less.)