If your gingerbread still sags after adding the baking soda in with the wet ingredients at the beginning, it could be the strength of your flour. Try using a flour with a higher protein level like King Arthur Flour's all-purpose flour, which has an 11.7% protein content (one of the highest for all-purpose flours). You could also substitute ¼ to ½ cup (30 to 60 grams) of bread flour (a stronger flour) for some of the all-purpose flour.