If a radar (say, an x-band radar similar in size to that of a modern fighter aircraft) was carried by a spaceship, would the radar have a greater range in vacuum of space than it has in atmosphere?
Air is an attenuating medium, so it does weaken the signal over long distances. However (on Earth, at least), long range radar is hampered more by orography and the curvature of the planet's surface (causing the beam to rise relative to the ellipsoid).
Indeed, the absence of absorption is an advantage but the spreading of the beam (it will never be completely parallel) works adversely. A far-away target will receive and hence reflect less radiation than one close by. It then depends on the reflected signal being above the detection threshold which is determined by the reiver's signal to noise ratio.