Preheat oven to 400°F. Line a large baking sheet with parchment.
Melt butter in a skillet over medium heat. Add apples, both sugars, lemon juice, cinnamon, nutmeg, and salt.
Cook, stirring, until apples soften, 5–6 minutes. Stir cornstarch with water. Pour slurry into skillet and simmer until glossy.
Remove from heat. Cool filling 10 minutes to thicken.
Lightly flour the counter. Unfold puff pastry and roll each sheet just to smooth the seams.
Place one sheet on the pan. Spread apple filling over it, leaving a 1/2-inch border on all sides.
Brush the border with milk. Lay the second sheet on top. Press and crimp edges to seal.
Dock the top with a fork and cut a few shallow slits. Brush with remaining milk and sprinkle coarse sugar, if using.
Bake until puffed and deep golden, 20–22 minutes. Cool on the pan 15 minutes.
Whisk powdered sugar, cider, and vanilla until thick and pourable. Adjust with a few drops of cider if needed.
Drizzle glaze over the pastry. Let set 5 minutes, then slice into bars and serve.