At the moment i'm training sword at a high level and instead of losing my target my character simply stops hitting, this is similar to the melee bug but is happening alot more often, infact its every few seconds and makes training impossible. 
Well if it's not a stamina problem, and you're not using really really really weak training weapons.
Then I'd say use hotkey's to attack.
Make this shortcut:
/target clear
/target nearest npc
/attack 1
Call the shortcut whatever you want lol

~~~~~~~~~~~~~
If it's not the first, than making that shortcut should fix it, ran into the same problem myself, been using that shortcut and hasn't bothered me since.
~~Datruth
