This was always a problem for me when I first started baking. I found that I was over-greasing the baking trays and started using parchment baking sheets. Another reason could be that you're baking the second batch of cookies on a tray that is too hot. Allow the pans to cool to room temperature before placing more dough on them to bake.