Preheat the oven to 400°F (200°C).
Season the beef tenderloin with salt and pepper. In a frying pan, heat the olive oil over medium-high heat and sear the beef on all sides until browned (about 2-3 minutes per side). Remove from heat and let it cool.
In the same pan, add the finely chopped mushrooms and minced garlic. Sauté until the mushrooms release their moisture and become golden brown (about 8-10 minutes). Season with salt and pepper, then let it cool.
Spread Dijon mustard over the seared beef tenderloin.
Lay the prosciutto slices on a sheet of plastic wrap, slightly overlapping. Spread the mushroom mixture over the prosciutto.
Place the beef at the edge of the prosciutto and roll it tightly using the plastic wrap. Twist the ends to secure and refrigerate for about 15 minutes.
On a floured surface, roll out the puff pastry. Unwrap the beef from the plastic and place it in the center of the pastry. Fold the pastry around the beef, sealing the edges well. Trim off any excess pastry.
Place the wrapped beef seam-side down on a baking sheet. Brush the top with the beaten egg for a golden finish. Make a few slits in the top for steam to escape.
Bake in the preheated oven for 25-30 minutes or until the pastry is golden brown and the beef reaches your desired doneness (115°F/45°C for rare, 125°F/52°C for medium-rare).
Remove from the oven and let it rest for about 10 minutes before slicing. Garnish with fresh thyme if desired.