Accuracy would depend on the math behind the shot. This wouldn't be the type of weapon that would be fired off the hip, it's a strategic weapon. The gunners would actually be mathematicians, astronomers, and generally the best minds we can find.
Even then, hitting an interplanetary target would be like threading a microscopic needle. Just hitting the planet would be amazing, hitting a specific target on that planet would be an absolute miracle.
An interplanetary shot has a lot of moving parts.
First you need to consider the rotation of the planet you are firing from, unless the gun is in space, to ensure that the shell can leave atmosphere and have a co use of unobstructed flight to location of the target.
Next, you need to have a clear shot. One might think this is simple but since the planet the target is on is in motion it's important to consider that another stellar body(which is also in motion) could easily become an obstacle. Essentially, you're not just aiming the gun, you need a flight plan for the shell that considers all obstacles, including gravity which could potentially be used to slingshot ordinance and make possible NLoS interplanetary shots... or throw your aim off completely and in the next ten trillion years someone has a really bad day.
Third, timing is the all essential part. The shell will take time to reach its target, all while the target is rotating around the planet's axis which rotates around a star's axis which often has multiple planets in it's orbit. More often than not this weapon will not be able to hit a target because it's just a bad time.
In conclusion(tl;dr), this weapon has the potential to be extremely accurate IF it can hit at all.