It has to do with the positioning of the origin point.
I tried to move the origin point in "camminadestra" animations to position it on the shield in each frame, and the movement work as intended.
If you don't want to change the origin point, instead of using two instances of "tornaindietro", make one object for the left boundary, one for the right (with different names) and on collision with either the first or the second object, set the boolean (don't just toggle it) to either "true" or "false".
This way you'll have a defined direction, and it doesn't matter how many times the ennemy sprite collides with the "detector" it will set it to one and only one direction.
I hope I'm being clear, let me know if not.