In a saucepan, melt the butter over medium heat. Add the flour and whisk continuously for about 1-2 minutes until it forms a smooth paste (roux). Gradually pour in the milk, whisking constantly to avoid lumps. Cook until the sauce thickens. Season with salt and pepper.
Lay out the slices of bread. If using Dijon mustard, spread a thin layer on each slice. Place a slice of ham on two slices of bread and top with a generous amount of Gruyre cheese. Place the remaining bread slices on top, creating two sandwiches.
Pour the bchamel sauce over each sandwich, ensuring an even coating. Make sure the sauce drips over the sides for a decadent finish.
Preheat the broiler. Place the sandwiches on a baking sheet and broil for 3-5 minutes or until the top is golden brown and bubbling. Keep a close eye to prevent burning.
Remove from the oven and let them cool for a minute. Slice diagonally and serve warm, allowing the rich flavors to unfold.