TL;DR: The rails will be a limit.
I had to look up to find the difference between a rail gun
and a coil gun, news to me.
As observed by @TigerGuy, there won't be so much a case of THE limiting factor as the (possibly long) list of limiting factors.
I read somewhere that the rail gun designs that have been come up with so far kind of take themselves apart with each shot. After the first few, you are lucky if it shoots at all, if the projectile goes where you expect, that is a bonus.
I guess the first question is what is accuracy? In engineering school, we learned about the difference between accuracy and precision. I expect the OP wants to know about repeatability. If I put a projectile at location (X,Y) how far off will subsequent projectiles be? That would be precision.
For a discussion of shooting a projectile in space, we need to define what is meant by "space." When in orbit, each shot will change the orbit (Remember Newton's third law, if you shoot a projectile one way, the gun goes the other). Assuming you have sufficient maneuvering rockets to correct the orbit after each shot, you have this annoying gravity thing to work around. "But there is no gravity in orbit!" Not exactly, you don't feel gravity because you are in freefall (orbit) along with everything around you but that does not mean it does not exist. If you are in orbit, shooting will hit where you are aiming only if the target is near. On land, the projectile drops because of gravity and can blow sideways due to wind. In space, hitting anything gets complicated in a hurry, like if the target is in a different orbit.
To simplify, let's say we have a rail gun on the moon with no atmosphere and limited, easy to calculate gravity. Now the problem of precision depends upon the gun.
When a rail gun is fired, the rails are pulled together by the magnetic fields induced by the currents. (This site says pushed apart but he's wrong.) If the distance between the rails changes, the resistance of the contactors will change so a given input voltage will push the projectile differently. The rails will try to come towards each other at the same time as the rails are being eaten away by the plasma contactors. ANY form of contactor will have some degree of arcing that will degrade the conductor surface. Again, this will change the current.
If we say we are going to measure the projectile velocity with radar and cut off the current when we hit a predetermined number we address the issue of that set of changes. The projectile will touch something as it progresses down the rails. The rails will wear. As the gun is used, the rails will get hotter. With no atmosphere to cool things down, it will keep getting hotter and distort as a result.
Where is the power coming from? Since this is on the moon, we can say we have a super-duper Mr. Fusion generator that can supply all the power we need at the same levels, indefinitely. Let's leave that aside.
I think the one thing you can not control is the straightness of the rails. They will start out pristine 0.0000001% straight and will stay that way until you use the gun once. After that, expect each successive projectile that actually goes somewhere to land within 0.1 radians. There is a reason nobody is pursuing rail guns much these days. You can do a lot better with rockets.
Compare that to WW2 vintage naval artillery. The main guns on the USS New Jersey could hit about 2.4% of their range. At 27,000 yards, they would hit within 648 yards. Keep in mind, this is shooting eight projectiles at once that weigh as much as my car.