Please note that in the picture, there are two forces acting: 1) the weight, mg, which acts vertically downward, and does not change, and 2) the tension in the string, Z, which points from the mass to the point the string connects to the ceiling, provided the string remains taut. Z varies with time periodically.
These two forces combine to give the resultant force, and it is the resultant force which occurs in the same direction as the acceleration, as seen in the gif.
The green arrows in the picture are actually just the tangential and normal components of gravity.
Edit: also, I believe the source of confusion might have lied with assuming the normal component of gravity cancels with the tension. This is not the case: you cannot use the equations of equilibrium if the system is not in equilibrium, i.e. accelerating.