Just launch something on the surface of a planet over 4,000,000m in size and this happens. It prevents building 1:1 scale solar systems and it is very severe and it makes it impossible to use full-scale planets, I am pretty sure that it is caused by the scaled space cubemaps loading while you are close to the planet, so increasing the distance the scaled space is loaded at might fix this, and it seems to only happen inside the planet's atmosphere
Try this...
Open up the planet XML, remove the "legacyQuadSphereActivationDistance" and "legacyQuadSphereTransitionDistance" attributes, then save the XML.