Yeah this happens when the server is in 'Cadet' mode. Then you can see enemy units on the map and their movement.
There's nothing you can do to prevent this through scripting, other than disallowing the map when you make a mission:
showMap false
That will prevent anyone from opening the map during the mission. But you may have things that need the map to be shown, like the Support pack or something.
Well, if you don't need the map, just disable it when you make the mission.