01 - Cut cold butter into flour in a large bowl until mixture resembles coarse crumbs. Mix in sourdough discard, sugar, and salt until soft dough forms. Shape into a disk, wrap in plastic, and refrigerate for at least 1 hour.
02 - Beat cream cheese in medium bowl until smooth. Add sugar, vanilla, and lemon juice; mix until creamy and fully combined. Set aside until needed.
03 - Combine raspberries, sugar, cornstarch, and lemon juice in small saucepan. Cook over medium heat, stirring constantly, until thickened, 3-5 minutes. Remove from heat and let cool completely.
04 - Preheat oven to 375°F. Line baking sheet with parchment paper. On lightly floured surface, roll chilled dough to 1/4-inch thickness. Cut into 8 rectangles or circles and place 2 inches apart on prepared sheet. Create indentation in center of each piece using fingers or spoon back. Spoon 1 tablespoon cream cheese filling into each center, then top with raspberry filling.
05 - Let assembled pastries rest at room temperature for 20-30 minutes to puff slightly. Brush edges lightly with beaten egg. Bake for 20-25 minutes until golden brown and set. Transfer to wire rack to cool completely.
06 - Whisk powdered sugar, milk, and vanilla until smooth consistency forms. Drizzle glaze over cooled pastries immediately before serving.