The use of real butter, ungreased and cooled cookie sheets can prevent cookies from baking flat. Butter contains less water than butter substitutes or margarine. The absence of water allows cookies to hold their shape better, according to Better Homes and Gardens.
If cooking multiple batches, allow the cookie sheet to cool to room temperature before placing the next batch on it to bake. Running cool water over the bottom of the cookie sheet also works to bring the temperature down.