Even lasers spread. This guy agrees with me: https://www.quora.com/Is-the-light-from-lasers-reduced-by-th...
But in the near field, that's not the case.
Beamforming arrays have planar wavefronts close to the source, so the inverse square law does not apply. The wave fronts will become spherical again at a "large" distance from the emitter, where the meaning of "large" depends on wavelength and emitter size.
Focussed lasers also do not have spherical wave fronts in the near field. The distance at which the inverse square law starts to apply to lasers depends on beam width, coherence, and focus.
I hope that helps picture the situation. My original comment that a beam can have a different exponent was incorrect except in some approximate sense. The inverse square value will still apply, but from the beams real or imaginary focal point (if it is a point) But it the case of a transmitter beaming a signal at another, that focal length can be far beyond the reciever, so the 'rule' can be completely confounded.