Grease a 1.5-quart loaf pan with butter or cooking spray.
Line the pan with two pieces of parchment paper, placing them in opposite directions to create a sling. Lightly grease the parchment paper and set aside.
In a small saucepan, warm the heavy cream and butter over medium-low heat until the butter is melted.
Stir the salt and vanilla into the cream mixture, then remove from the heat and keep nearby.
Add the granulated sugar to a separate heavy-bottomed saucepan.
Cook the sugar over medium heat until it melts into a deep amber syrup. If using a thermometer, the melted sugar should be around 350°F.
Remove the pan from the heat.
Slowly pour the warm cream and butter mixture into the caramelized sugar while stirring constantly. Be careful, because the mixture will bubble up quickly.
Stir in the lemon juice.
Return the pan to medium heat.
Cook, stirring constantly, until the caramel reaches 245°F to 250°F.
Pour the hot caramel into the prepared loaf pan.
Let the caramel cool and set at room temperature for at least 3 hours, or overnight.
Lift the caramel from the pan using the parchment paper.
Sprinkle with flaky sea salt, if desired.
Cut into small pieces with a sharp knife.
Wrap each caramel in wax paper or parchment paper.