Preheat the oven to 400°F (200°C) and line a large baking sheet with parchment paper.
In a large skillet, heat the olive oil over medium heat. Sauté the onions and garlic until softened and fragrant, about 3-4 minutes.
Add the finely chopped mushrooms, thyme, and parsley to the skillet. Cook for 8-10 minutes, stirring occasionally, until the mushrooms have released their moisture and the pan is mostly dry.
Stir in the cooked lentils, chopped walnuts, and cooked diced potatoes. Season generously with salt and pepper. Remove the pan from the heat and let the filling mixture cool completely to prevent the pastry from becoming soggy.
Roll out the thawed puff pastry sheets on a lightly floured surface. Spoon the cooled vegetable filling onto the center of the pastry, shaping it into a compact log.
Fold the sides and ends of the puff pastry over the filling to enclose it completely. Pinch the seams to seal tightly. Place the Wellington seam-side down on the prepared baking sheet.
Brush the entire surface of the pastry with the beaten egg. Use a sharp knife to cut 3 to 4 small diagonal slits in the top of the pastry to allow steam to escape.
Bake in the preheated oven for 30 to 35 minutes, or until the pastry is puffed and deep golden brown.
Allow the Vegetable Wellington to rest for 10 minutes before slicing. Serve warm with berry sauce on the side.