If possible, make the pie crusts the day before. Cold dough = better pie! Follow your pie crust recipe and chill thoroughly.
Wash and fully dry the cherries. Remove stems and pits. Cut half of the cherries in half, and the rest into quarters. Add cherries to a medium pot with sugar and lemon juice. Cook, stirring occasionally, over medium heat for 3 to 5 minutes until juices are released.
Use a slotted spoon to transfer cherries to a large bowl, leaving the juices in the pot on the stovetop.
In a separate small bowl, add the cornstarch. Remove 2 tablespoons of the hot cherry juice and whisk it into the cornstarch until smooth. Gradually pour the cornstarch mixture back into the pot with the remaining juice, whisking constantly to prevent lumps. Cook, whisking constantly, over medium heat until thick and smooth, about 3 to 5 minutes.
Pour over the cherries and gently toss to coat. Stir in butter until melted. Add vanilla and almond extract, if using. Refrigerate the filling while you roll out the pie crust. Filling should be cold before adding to the base crust.
Lightly grease a 9-inch pie pan with cooking spray. Roll out one chilled pie crust to a 12-inch circle. Fit into the pan and spoon in the cooled cherry filling.
Preheat oven to 400°F. Roll out the second crust and cut into 1/2-inch strips. Arrange over the filling in a lattice pattern. Seal and crimp the edges as desired.
Whisk egg and milk in a small bowl. Brush over the top crust, then sprinkle with coarse sugar.
Bake at 400°F for 20 minutes. Lower oven to 375°F and bake an additional 30 to 40 minutes, or until the top is golden and juices bubble through the crust for at least 5 minutes.
Check the pie after 30 minutes and cover the edges with a pie crust shield if browning too quickly. Let the pie cool on a wire rack for at least 3 to 4 hours before slicing.
The filling sets as it cools. Cutting too early will result in a runny pie. Once fully cooled, slice and serve, or cover and refrigerate to serve the next day.