To a large mixing bowl add gluten free flour, xanthan gum, salt and sugar. Mix well.
Add cold cubed butter and rub into the flour using a fork until it starts to look like breadcrumbs. Add the egg and mix in using a table knife.
Add water 1 tablespoon at a time and mix well until it starts to form a dough (you will need around 3-4 tablespoons in total).
Turn out onto a floured surface and knead until smooth. Wrap in clingfilm and place in the fridge for at least an hour.
Preheat oven to 180°C. Add the sliced peaches to a large bowl with brown sugar, lemon juice, vanilla extract, cornflour and cinnamon, mix well.
Remove pastry from the fridge and roll out to an oval shape. Sprinkle the base with ground almonds and then spoon the peach mixture into the middle of the pastry, leaving a couple of inches gap around the outside. Sprinkle the raspberries on top of the peach mixture.
Fold the edges of the pastry to slightly overlap the filling, leaving a large open space in the centre. Brush the pastry with beaten egg and sprinkle with demerara sugar. Bake in the oven for around 40-45 minutes, until golden brown and cooked through. Serve warm from the oven.