Does the AI consider anything else as expansion point? It will most likely need to be a gold mine but you may try some methods that ward off harvesting like constructing a barrier around it, turning the unit locust or just removing the gold mine ability later on.
Well getting the AI to not harvest is easy, I'm just more worried about players collecting gold as "Please just don't collect gold" is kind of unprofessional and cheesy. The command points I have are like that, but the AI doesn't see them as expansion points.
So what way did you choose to deter the AI from harvesting?
add all units that can harvest gold into a unit group. Then check each unit to see if it is issued an order to harvest gold from a gold mine that you dont want the gold to be mined from.
Alternatively. (not sure about this one)
when a mining unit enters the map add the event unit - specific unit is issued an order targeting the gold mines you dont want it to mine from. Then in the trigger that gets those events added stop the triggering unit from mining the gold.