If the door is centered in a 2X4 wall, approx. 4 1/2" thick, Fastener length must be carefully watched. Sheetrock screws should be only 1" long, if the typical 1 1/4" screws are used when the screws are set below the surface, the smallest, barely undetectable screw point will stick through and scratch a door. A few can be ground at the opening, but the ones farther in will not be able to be ground at all. They really need to be replaced. Even the nails holding the trim to the face of the wall, needs to be carefully set. If the trim is 11/16" thick and not 3/4" by the time a 2" nail is set below the surface, the point can protrude as much a 1/8" beyond the pocket door framing.
A picture would be helpful, but if the scratches are across the whole width of the door, the nails or screws that are doing the scratching are near the opening. Grinding may fix the problem. If the scratches are at the edge closest to the pocket, the problem is much deeper in the pocket and the fasters in that area needs to be replaced with shorter fasteners.