The JWST has an angular resolution of 0.1 arc seconds (according to a quick google search). This means a pixel at a distance of a parsec will correspond to about 0.1 astronomical units, which is about 20 times the radius of the Sun.
Of course, this doesn't mean that the telescope can't image light from a smaller planet, just that there would be no resolution to distinguish features on the planet itself. Similarly, even though lots of stars and other astronomical objects are too small to resolve, we can still see the light from them with telescopes (and our eyes).