Heat the oven to 400°F (200°C). Line a rimmed baking sheet with parchment. Keep the puff pastry cold until you are ready to assemble.
Warm the olive oil and butter in a wide skillet over medium heat. Add the onion and cook for 6 to 8 minutes, stirring, until soft and lightly golden.
Add the mushrooms in an even layer. Cook for 8 to 10 minutes, stirring only occasionally, until their released liquid has evaporated and the edges are browned. Stir in the garlic, thyme, salt, and pepper for the final 30 seconds. Transfer the filling to a plate and cool for 10 minutes; a hot filling can soften the pastry.
On a lightly floured surface, roll the cold pastry into a rectangle about 10 by 14 inches. Move it to the prepared sheet. Lightly score a 1-inch border without cutting through, then prick the center with a fork. Spread Dijon inside the border and scatter over the Gruyère.
Spoon the cooled mushroom mixture over the cheese. Fold and pleat the pastry border around the filling. Brush the edge with the egg wash.
Bake for 25 to 30 minutes, rotating the pan once, until the pastry is puffed and deep golden underneath and around the edges. Rest for 10 minutes, then finish with parsley and slice. If the center still looks pale, bake 3 to 5 minutes longer.