Preheat your oven to 400°F (200°C) and line a baking sheet with parchment paper.
Melt 2 tbsp of butter in a small saucepan over medium heat.
Whisk in 2 tbsp flour and cook for 1 minute.
Gradually whisk in 1 cup of milk, stirring constantly until thickened.
Mix in 1/2 cup Gruyère, Parmesan, a pinch of nutmeg, and season with salt and pepper. Set aside.
Spread a thin layer of Dijon mustard (if using) on 2 slices of bread.
Place 1 slice of ham on each mustard-covered piece.
Sprinkle a little Gruyère over the ham, then top with the other bread slices.
Spread softened butter generously on the outsides of the sandwiches.
Heat a skillet over medium heat and add a small pat of butter.
Toast each sandwich for 2-3 minutes per side until golden brown. Transfer to the prepared baking sheet.
Spoon beschamel sauce over the top of each sandwich.
Sprinkle the remaining Gruyère cheese evenly on top.
Bake in the oven for 5-7 minutes, then broil for 2-3 minutes to create a bubbly, golden crust. Watch carefully to avoid burning.
Let the sandwiches cool slightly before serving. Pair with a side salad or soup for a complete meal.