Preheat your oven to 325°F and line an 8x8-inch metal baking dish with parchment paper, leaving an overhang for easy removal. Use metal binder clips to secure the parchment to the pan if needed. Set aside.
In a medium saucepan, melt the butter over medium heat. As it melts, it will start to bubble and sizzle. After a few minutes, the bubbles will turn foamy, and you’ll see small golden brown specks forming at the bottom of the pan. Swirl the pan occasionally and watch closely—once the butter turns a deep amber color and gives off a nutty aroma, it’s done. Immediately remove from heat to prevent burning and pour it into a large heatproof bowl. Let it cool to room temperature for about 10 minutes.
¾ cup unsalted butter
Once the butter has cooled, whisk in the brown sugar and white sugar until fully incorporated, about 30-45 seconds.
½ cup brown sugar, ½ white sugar packed
In a small bowl, whisk the eggs and cream cheese together until smooth. Add this mixture to the bowl with the butter and sugar, whisking vigorously until the batter starts to lighten in color, about 1 minute. The mixture may look thick and slightly lumpy at first due to the cream cheese, but that’s okay! Once the dry ingredients are added, it will smooth out. Whisk in the vanilla extract until combined.
2 eggs, 4 ounce cream cheese, 1 teaspoon vanilla bean paste or pure vanilla extract
Add the cornstarch, baking powder, salt, and flour to the wet ingredients. Use a spatula to fold everything together until just combined—be careful not to overmix. Overmixing can develop gluten in the flour, leading to a denser texture instead of soft, tender bars. Stop as soon as there are no visible streaks of flour.
1 teaspoon cornstarch, ¾ teaspoon baking powder, ¾ teaspoon salt, 1 ½ cup all purpose flour
Spread the batter evenly into the prepared baking dish, making sure it reaches the edges. Since the batter is thick, use an offset spatula or the back of a spoon to gently press and smooth it out. Spreading it evenly helps ensure an even bake.
Bake for 25 to 28 minutes, or until the edges are lightly golden and a toothpick inserted in the center comes out clean. If your oven runs hot, check at 25 minutes to prevent overbaking.
Remove the bars from the oven and let them cool completely in the pan before frosting. If you want to speed up the cooling process, let them cool for 15 minutes at room temperature, then transfer to the freezer for another 15 minutes while making the frosting.
For the Cream Cheese Frosting
In the bowl of an electric mixer, beat the butter and cream cheese on medium speed for about 2 minutes. Scrape down the sides and bottom of the bowl, then beat for another 2 minutes until smooth and fluffy.
½ cup unsalted butter room temperature, 4 ounces cream cheese room temperature
With the mixer on low, gradually add the powdered sugar, followed by the heavy cream, vanilla extract, and salt. Mix on low until just combined, then scrape down the sides of the bowl. If adding food coloring, mix it in at this stage.
3 cups powdered sugar, 2 tablespoons heavy whipping cream, ½ teaspoon pure vanilla extract, ¼ teaspoon salt
Increase the speed to medium and beat for about 3 minutes until the frosting is smooth and fluffy. If the frosting feels too thick, add an extra teaspoon of cream until it reaches a spreadable consistency. If it’s too thin, beat in a little more powdered sugar, a tablespoon at a time. The frosting should be thick enough to hold its shape but soft enough to spread easily.
Use a rubber spatula or wooden spoon to beat out any air pockets by hand for a silky, smooth texture.
Keep the bars in the pan and evenly spread the frosting over the top. Sprinkle with sprinkles if using. Place the pan in the freezer for 10 minutes to help the frosting set.