If you have time, place the beef in a large bowl with the herbs and star anis and season well with pepper. Pour over all the wine, cover with cling film and chill for up to 24 hrs.
The next day sit a colander over another bowl and drain the beef well. Pick out the herbs and star anis and set aside. If you don’t have time just start with all the ingredients prepared and ready to cook.
Heat oven to 170C/150C fan/gas 3 - 4. Heat a drizzle of oil in a large casserole until very hot then brown the meat well in batches.
For each batch, heat more oil and brown for around 10 mins before transferring to a plate and repeating the process.
When all the meat is done add the vegetables and cook for 5 mins until starting to colour then add the herbs and star anis and cook for a minute more.
Sprinkle sugar over the vegetables, then scatter over the gluten free flour and stir together.
Cook for a few minutes until starting to brown, stir in the tomato purée then pour over the wine, scraping the bottom of the pan with your spoon.
Tip in the beef and any juices then cover the meat and vegetables in stock.
Season with salt and pepper and bring everything to the boil, stir well, cover and place in the oven for 2 1/2 hrs until the meat is really tender.
This can be done up to 3 days in advance and chilled until ready to make the pie or frozen for up to 3 months.
To make the pie heat oven to 200C/180C fan/ gas 6. Tip the filling into a 2-litre pie or baking dish. Roll the gluten free pastry out on a lightly (gluten free) floured surface to fit the pie dish with a slight overhang and drape over the dish.
Crimp the edges if you are able to and poke a couple of little steam holes in the middle.
Brush the gluten free pastry with the beaten egg and sprinkle with flaky sea salt. Bake for 30 mins until golden brown. This is goes well with mash and green beans.