Gritty texture in cookies
It is unlikely that the chemical leavening was a contributor to perceived grittiness.  If you had extra leavening, especially in clumps large enough to perceive, you would also have a very metallic off taste, that surely would have been worth mentioning.



These cookies are made by the creaming method, and have very little water.   The most likely suspect to cause graininess is the sugar.

If there were clumps in the granulated sugar for any reason, they might not dissolve completely during the mixing or baking, leaving a gritty texture.

The way to prevent this, if you consider the effort worth it, is to sift the sugar through a very fine strainer prior to using it in your dough.