I think this is a case of the Screenwriter having one idea and the Director having another
If you read the original script, the USS Jenolan's shields were already failing when they moved into the Dyson Sphere's doorway. Scott was able to squeeze a "few extra gigawatts" out of them but at the point that the Enterprise moved into transporter range there is an explosion and the shields seem to have failed (and hence weren't able to block the transporter beam). A milisecond later, the torpedoes explode the ship.
INT. JENOLEN : As before. The ship is falling apart... SHAKING badly... consoles starting to SPARK and EXPLODE... the lighting is FLICKERING... and the engine noise is a SHRIEK of overworked metal.
SCOTT : (a shout) It's coming apart, Lad. I can't do anything else.
INT. MAIN BRIDGE : As before.
DATA : We are within transporter range.
PICARD : (quickly) Bridge to Transporter Room. Energize. (a quick beat, then to Worf) Fire torpedoes.
In the show, the shields are shown as having collapsed after the impact of the torpedoes and after Scotty and LaForge have been transported. No convincing explanation for the difference has been offered by the show staff other than a shrug.