Preheat oven to 375°F (190°C). Line a 9-inch square baking pan with heavy-duty foil, letting excess extend over sides of pan. Lightly spray foil with cooking spray.
In a medium bowl, whisk together flour and baking powder.
In a large microwave-safe bowl, heat ⅔ cup (150 grams) butter on high in 10-second intervals, stirring between each, until melted. Whisk in 1 cup (200 grams) granulated sugar, ricotta, 1½ teaspoons (4.5 grams) salt, and 1 teaspoon (4 grams) vanilla. Stir in flour mixture until combined. Reserve 1 cup (289 grams) dough in a small bowl. Press remaining dough into bottom of prepared pan.
Bake until dough edges are lightly browned, 10 to 12 minutes. Let cool slightly in pan on a wire rack. Leave oven on.
Meanwhile, in a medium saucepan, whisk together cornstarch, remaining ⅔ cup (133 grams) granulated sugar, and remaining ½ teaspoon salt. Stir in 3 cups (450 grams) cherries, 2 tablespoons (30 grams) lemon juice, and remaining 3 tablespoons (42 grams) butter. Cook over medium heat, stirring frequently, until bubbles begin to form around sides of pan and liquid is thickened, 5 to 6 minutes.
Remove from heat; stir in remaining 2 cups (300 grams) cherries and remaining ½ teaspoon (2 grams) vanilla. Spread onto prepared crust. Crumble reserved dough onto cherries.
Bake until topping is golden brown and filling is bubbly, 18 to 20 minutes. Let cool completely in pan on a wire rack.
Using excess foil as handles, remove from pan, and cut into bars.
In another medium bowl, whisk together mascarpone and confectioners’ sugar; whisk in milk and remaining 1 tablespoon (15 grams) lemon juice until smooth and pourable. Drizzle onto bars. Refrigerate in an airtight container for up to 3 days.