Beat the softened butter and granulated sugar together until light and fluffy, about 2 minutes.
Add the egg, vanilla, and almond extract if using, and mix until just combined.
Whisk the flour, baking powder, salt, and cornstarch together, then mix into the butter mixture until the flour just disappears. Avoid overmixing.
Press the dough evenly into a greased 9x13 pan, using floured hands or an offset spatula since the dough is sticky.
Bake at 350°F for 18-20 minutes, until the edges are lightly golden and the center still looks a little underdone. The bars keep setting as they cool.
Let the bars cool completely in the pan before frosting, at least 1 hour.
Spread the frosting over the cooled bars and add sprinkles. Let the frosting firm up about 30 minutes, then cut into bars, wiping the knife clean between cuts.