Make the Cookie Dough
Preheat your oven to 350°F (175°C). Line two baking sheets with parchment paper.
In a medium bowl, whisk together the flour, cornstarch, espresso powder, baking soda, and salt.
In a separate bowl, beat the butter and sugar on medium speed for 3 minutes until light and fluffy.
Scrape down the sides of the bowl, then add the egg and vanilla. Mix on low speed for 30 seconds, just until combined.
Gradually add the dry ingredients to the wet ingredients while mixing on low speed. Stop once the dough is fully combined.
Bake the Cookies
Scoop 1½ tablespoon-sized portions of dough and roll into balls. Place them 2 inches apart on the prepared baking sheets.
Bake for 9 to 10 minutes, or until the edges are lightly golden and the tops appear set.
Let the cookies cool on the baking sheet for 5 minutes, then transfer to a wire rack to cool completely before frosting.
Make the Mascarpone Frosting
In a stand mixer fitted with a whisk attachment, beat the mascarpone, cream cheese, powdered sugar, vanilla, and salt on medium speed until creamy (about 1 minute).
With the mixer on medium-low speed, slowly drizzle in the cold heavy cream. Stop and scrape down the sides of the bowl.
Increase the speed to medium and beat until stiff peaks form (1 to 2 minutes).
If using, mix in the Kahlua until fully incorporated.
Frost and Decorate the Cookies
Transfer the frosting to a piping bag and cut a ½-inch wide opening at the tip.
Pipe the frosting onto the fully cooled cookies in a spiral motion, starting from the center.
Lightly dust with dark cocoa powder using a fine-mesh sieve.