This is probably because you waited too long before flipping it. When the caramel cools down, it hardens and sticks to the pan. Flip after 10-15 minutes.