My char stops attacking

after going afk for minutes, sometimes hours or days, my char stops attacking while botting. Whenever i realize this, i click on the ground and it starts attacking right away. I am facing this issue for ever, i tried deleting config and set up my bot all over. Its now still the same issue on different computer and fresh bot files.

stoppig and starting bot doesnt work i only have to click on the ground for it to start attacking