Almond flour cookies can easily go flat with the lack of structure in the flour. Make sure to lightly pack each cup of flour as there can be an inconsistent amount in each cup, causing either too much or too little almond flour. Also, make sure your butter isn't too soft as this will also spread your cookies very thin while they bake. Place the cookie dough in the fridge to firm up before baking.