Ensure that your cookie dough is at room temperature, not soft or melty. If needed place the dough back into the fridge until firm. If the dough is too soft the butter will melt more easily and cause the cookies to spread.