If the caramel leaked out of the cookie, that means the second layer of cookie dough didn’t completely enclose it, so make sure the caramel is completely covered and sealed between the two layers of cookie dough balls, and you should end up with perfect soft melted caramel centers and no leakage.