The inverse square law only applies to a point source radiating uniformly in all directions.
Laser and microwave beams, while they do suffer from losses over distance, aren't anywhere near that bad.
Laser and microwave beams, while they do suffer from losses over distance, aren't anywhere near that bad.