Whisk the cornstarch and water together until all the cornstarch has dissolved.
Combine cornstarch mixture, raspberries (no need to thaw if using frozen), granulated sugar, and lemon juice in a medium saucepan set over medium heat.
Using a silicone spatula, stir the mixture, mashing the raspberries as they begin to thaw and soften.
Bring to a boil and let it boil for 5 full minutes, stirring occasionally.
Remove pan from heat and stir in vanilla extract.
Allow the raspberry filling to cool at room temperature for 10–15 minutes, then transfer it to a bowl or container and place it in the refrigerator for at least 4 hours.