Using a mandoline, knife, or food processor, finely slice the Brussels sprouts until thinly shaved. Do the same with the onion, slicing it finely.
Heat a pan over medium heat, add a knob of butter, and add the onion and most of the sage (reserve some for the breadcrumb topping). Fry for 5 minutes until softening, then tip in the sprouts. Season with salt and pepper and fry for 8 minutes until softened but not fully cooked.
Remove the sprouts and onion from the pan. Add the 2 tablespoons of butter to the empty pan. Once melted, add the flour and stir well, cooking out the raw flour for a few minutes. Gradually pour in the milk a bit at a time, turning heat to low. Whisk continuously to remove any lumps — the sauce will come together as it heats and bubbles. Stir in the mozzarella, most of the grated cheddar, salt, pepper, and Dijon mustard. If the sauce thickens too much from the cheese, add a splash more milk and keep whisking until it loosens.
Once you have a smooth, melted sauce, fold in the Brussels sprouts and onion. Transfer everything to a baking dish. Mix the remaining cheddar, reserved sage, and panko crumbs together, then sprinkle over the top of the gratin.
Place in a 410°F oven for 15–20 minutes until cooked through and golden on top. If the top isn't browning enough, switch the oven to broil and let it get bubbling and golden. Serve as a side dish.