Heat the oil in a large saucepan and sauté the onion and garlic for 5 minutes, until softened. Add the balsamic vinegar, yeast extract or miso paste, tomato puree and mushrooms and cook for a further 8 minutes.
Sprinkle the flour on top and stir to incorporate. Add the stock and bring to a boil, then reduce the heat and simmer for about 5 minutes until you have a gravy-like mixture. Remove from the heat, stir in the beans and allow to cool completely.
Preheat the oven to 220°C/425°F/gas mark 7.
Divide the filling into four individual pie dishes. Brush the edges of the dishes with a little aquafaba or milk.
Slice both pastry sheets in half and use a half to top each pie dish, crimping the edges to seal and scoring the tops with a sharp knife. Brush the tops with some more aquafaba or milk and bake for 30 minutes, until puffed and golden on top. Serve immediately.