Start by melting butter in a saucepan over medium heat. Add flour and whisk continuously until it forms a smooth paste. Gradually pour in milk while whisking to avoid lumps. Cook until thick and creamy, then season with salt, pepper, and a touch of Dijon mustard.
Lay out the bread slices and lightly butter one side of each. Spread a thin layer of béchamel on the unbuttered side. Add ham slices and sprinkle some Gruyère cheese before topping with another slice of bread.
Place the sandwiches on a baking sheet and spread more béchamel on top. Sprinkle with remaining cheese for a rich, golden crust. Bake in a preheated oven until the tops are bubbly and lightly browned.
For extra crispiness, switch to broil mode for a few minutes. Keep a close eye so the cheese doesn’t burn. Once golden and slightly crisp, remove and let cool slightly before serving.