Preheat the oven to 350°F. Line a light-colored metal 8×8 baking pan with parchment paper, leaving an overhang on two sides so you can lift the bars out later. (If you only have a glass pan, plan to add 2 to 3 minutes to the bake time, since glass bakes slower and is the most common reason the center turns out underdone.)
In a large bowl, cream the butter, granulated sugar, and brown sugar together until smooth and creamy. Add the egg, vanilla extract, and almond extract (if using), and mix to combine.
1/2 cup butter, 1/2 cup granulated sugar, 2 tbsp brown sugar, 1 large egg, 2 tsp vanilla extract, 1/4 tsp almond extract
Mix in the flour, cornstarch, baking powder, and salt just until the flour disappears. Do not overmix. Spread the dough evenly into the prepared pan, pushing it all the way into the corners so it bakes evenly.
1/2 tsp baking powder, 1 cup all purpose flour & 2 tablespoons, 2 tbsp cornstarch, 1/4 tsp salt
Bake for 16 to 18 minutes, until the edges are set and lightly golden and the center looks puffed and matte, not wet or shiny. The very center will still feel soft to the touch, and that is correct. A toothpick in the center should come out with a few moist crumbs, not wet batter. These bars finish setting as they cool, so it is better to pull them slightly early than to overbake.
Let the bars cool completely in the pan, at least 1 hour, before frosting or slicing. This step is not optional. They keep cooking and setting as they cool, so cutting in while they are warm is the number one reason the center seems raw. Once fully cool, the center firms into a soft, chewy bar.