Honestly, I was incapable of finding where the flaw was in your code because ultimately I was unable to untangle the code in my head. It was very nested and maybe not so organized, so I can't properly say to you what went wrong, sorry about that.
On the skeleton note, you can still stop them from moving when attacking, since you have the boolean called "attacking", so... just make it not move when "attacking = true".
The skeleton follows the player from a certain "Range" already, this is defined by the "Line of Sight" behavior. It also only attacks from a certain "Range", this one defined by the instance variable inside each skeleton.
Also it's hard to properly give any insights on the matter because when it comes to combat, every behavior and every move is unique in their own way, and each game may handle them differently. I would suggest only for you to take your time and work the logic gates the best you can to avoid convoluted code, also make it modular. Treat movements apart from animations for instance, and in this way it will be easier to debug when things go south.
Glad I could help, but keep me posted on your evolution. If anything comes up just continue this thread.
EDIT: You also already have something like your old "following" boolean, which is "Has LOS to object" from the "Line of Sight" behavior. If it has LOS, it is following, so no need for adding an unnecessary variable.