Heat the oven to 375°F and grease a 9-by-13-inch dish. Brown the beef and onion, season with 1/2 teaspoon salt and drain.
Melt the butter in a saucepan, stir in flour for 1 minute, then whisk in milk, Dijon, remaining salt and pepper. Simmer until lightly thickened and stir in 2 cups cheddar.
Layer one-third potatoes, half the beef and one-third sauce in the dish. Repeat, then finish with potatoes and remaining sauce.
Cover tightly with foil and bake for 55 minutes. Uncover, sprinkle with remaining cheddar and bake 15 to 20 minutes more until a knife slides through the center.
Rest for 15 minutes before cutting into squares.