I've had the mold problem too. There must be something in the StarSan that has nutrients for mold to grow, and when the PH gets high enough ...... 'stuff' can grow. It only happens on the lid and nowhere near the liquid, and only after a decent length of time (Month +, probably 2 or 3 months).
I keep StarSan in a 1 gallon bowl that I sanitize small stuff in, and pour into fermenters, and then back into the bowl. I keep the same solution for several months; usually until it gets murky, or half of it is gone. Usually lasts 2 to 3 months.
I've used StarSan for several years, and only seen he mold on a couple of occasions. It is worrying when you see it, but I think it is isolated and easily cleaned up. Not had any infection issues with my beer (for any reasons).