This "law" is only for point (or spherical) sources, i.e. those emitting evenly in all direction - the area is increasing as a square of distance and thus signal power drops accordingly. With lasers, directional antennas, phased array antennas [1] the signal won't decay that fast. For instance with lasers it will be just a matter of alignment of internal elements to obtain a parallel light beam which doesn't lose power over distance (obviously there are other factors - atmosphere, particles in the vacuum, et al which will result in diveregence anyway).
In fact some billionaires [2] invest into using telescopes with fast sampling cameras (in this case IACT [3] telescopes used normally to detect gamma-rays by their interaction with the atmosphere) to detect flashed of extraterrestrial lasers.
[1] https://en.wikipedia.org/wiki/Phased_array (see the animation of the radiation pattern)
[2] https://www.space.com/are-aliens-flashing-laser-beams.html
[3] https://en.wikipedia.org/wiki/IACT