To preserve the shape of the marshmallows, press a piece into the center of each cookie after baking for about half of the total baking time. This way, they'll melt slightly but retain their form.