Put the oil into a large non-stick frying pan and place over a medium high heat. Add the onion and mushrooms and sauté for 12–15 minutes until the mushroom juices have been released and have evaporated, so the pan is mostly dry and the mushrooms are golden. Add the garlic and cook for another 3 minutes until aromatic.
Mix in the flour and cook for 3 minutes, stirring frequently. Add the vegetarian meatballs or burgers, thyme and stock and bring to the boil. Reduce the heat and simmer for 5 minutes until the sauce is thickened. Stir in the mustard, soy sauce and balsamic vinegar and cook for another 3 minutes. Season to taste.
Preheat the oven to 220°C/425°F/gas mark 7. Turn a 23 cm pie dish upside down and place it on top of the rolled-out sheet of puff pastry.
Cut around the perimeter of the dish, leaving an extra centimetre of pastry overlapping. Turn the dish right side up and tip in the pie mixture. Dampen the rim of the dish with a little water, then carefully place the puff pastry lid on top and crimp the edges into place. If you like, you can use the leftover pastry to create cut-outs for the top of the pie – leaves, letters or whatever you like.
Brush the pastry gently with a little milk and make a hole in the centre of the pastry for the steam to escape while the pie is cooking.
Bake the pie in the preheated oven for 10 minutes, then reduce the heat to 200°C/400°F/gas mark 6 and cook for another 15–20 minutes until the pastry is deeply golden and crisp. Serve immediately.