On my end, when I right-click harvest, it harvests whatever I clicked on and then goes on to auto-attack the nearest enemy. when there are no enemies it just stops and I'll have to right-click the next harvestable resource again. I am on Brave browser if that helps.