I mean make it so that enemy scouts can't "detect" it and make it target-able. @GoaFan77: If I were to make an educated guess based on what I have seen in various game files, the AI would ignore that, and just go about it's merry business.
Actually not. The AI doesn't see like we do, for example one trick for manipulating the AI is to place research off the tech trees so no human players can physically press the button to research them, but the AI still can. Likewise the AI likely keeps a list of all objects a in gravity wells it has explored, even if there is no visual clues for human players.
To just make it so scouts don't reveal mines, just remove the ability from them. Though that will mean the only way to get rid of them will be to detonate them...