The key lies in layering the caramel within the dough and baking at the right temperature. Make sure not to overbake, as that can cause the caramel to harden.