Boil the pasta: Cook the elbow macaroni in salted boiling water until just shy of al dente, about 7 minutes. Drain well and set aside.
Melt the butter: In the same pot, melt the butter over medium heat until it foams slightly. Keep the heat steady so it doesn't brown.
Make the roux: Whisk in the flour and cook for about 1 minute, stirring constantly, until it smells toasty and looks pale gold.
Add the milk gradually: Pour in the milk a little at a time, whisking constantly to prevent lumps. Keep whisking until the mixture is smooth.
Simmer until thick: Bring the sauce to a gentle simmer and cook, stirring often, until it coats the back of a spoon, about 5 minutes.
Remove from heat: Take the pot off the heat before adding cheese so the sauce stays smooth instead of grainy.
Stir in the cheddar: Add the shredded white cheddar a handful at a time, stirring until each addition melts fully before adding more.
Add Parmesan and mustard: Stir in the Parmesan and Dijon mustard until the sauce turns glossy and smooth.
Season the sauce: Add salt, black pepper, and cayenne if using. Taste and adjust, keeping in mind the cheeses add their own saltiness.
Fold in the pasta: Add the drained macaroni to the sauce and stir gently until every piece is coated in cheese.
Serve immediately: Spoon the mac and cheese into bowls right away while the sauce is still loose, since it thickens as it cools.