Honestly, in the case of XIV I think they could actually kill them off they wanted/tried to.
Gathering/FATE/PvP bots are not terribly common due to generally being the main or alt accounts of actual players and a diligent team could easily keep them under control. If people start getting banned regularly, it'll instill a sense of fear and make others reluctant to take up/continue botting.
As for the gil farmers, they exploit several fundamental flaws in how the game is coded/designed, but fixing up just a few of them would severely hinder if not kill off their ability to function. One of the main things they abuse is the fact that mobs in dungeons will not reset if they're being attacked from out of bounds and instead will just sit there and do nothing until they're dead, allowing them to be killed with no fear of reprisal (The only reason they keep a WHM around is because some bosses have AoEs that will still hit them even if they're out of bounds/LoS). If they tweaked their AI to reset like some enemies out in the world do, they'd be unable to kill anything and unable to finish dungeons to farm gil as a result.