01 - In a medium saucepan, melt the butter over medium heat. Add diced apples, brown sugar, cinnamon, nutmeg, lemon juice, and a pinch of salt. Cook for 5 to 7 minutes until the apples are tender. Stir in cornstarch and cook an additional 2 to 3 minutes until thickened. Remove from heat and allow the mixture to cool completely.
02 - Preheat the oven to 350°F (175°C). Line two baking sheets with parchment paper. In a large mixing bowl, cream softened butter with granulated sugar until light and fluffy. Beat in the egg and vanilla extract. In a separate bowl, whisk together the flour, baking powder, and salt. Gradually incorporate the dry mixture into the wet ingredients until a dough forms. Roll dough into 16 equal balls, approximately 2 tablespoons each, and place on prepared baking sheets. Flatten slightly, then bake for 10 to 12 minutes, or until the edges just begin to turn golden. Cool completely on wire racks.
03 - In a small saucepan, simmer the root beer over medium heat until it reduces to about 2 tablespoons and achieves a syrupy consistency, approximately 10 minutes. Remove from the heat and allow to cool fully.
04 - Let the vanilla ice cream soften slightly. In a bowl, gently swirl the cooled apple pie filling and root beer syrup into the ice cream to create distinct ribbons, being careful not to overmix. Freeze until firm, about 1 hour. To assemble, scoop approximately 1/3 cup of the apple-root beer ice cream onto the flat side of one sugar cookie, then top with a second cookie. Press gently to form a sandwich. Repeat this process for all sandwiches. Wrap each sandwich in plastic or wax paper and freeze for at least 2 hours before serving.