In a subsonic missile , 4km is enough. For a supersonic missile, like Brahmos, one little error or a second of jamming throws it off target by a mile. thats why so many Brahmos were found in the fields and ditches. The few which did find the targets , also skimmed, not actually hit. As evident by the pictures the Indians keep posting.
Because PAF was actively jamming, and by the time the software kicks in the error correction, the missile is flying too fast to fully utilize it.
To PAF credit, they even jammed one of the world's most advanced cruise missile, the Storm Shadow, On a side note its made in Bolton England., so same way as India complains. Pakistan should complain to England .
Thats why Storm shadow was found fully intact in a field. That missile has all the anti jammig and course correction features, but still missed the target by quite a margine.