This equation is only accurate in the far field where spherical spreading can be assumed. I.E. this equation will provide negative path loss (positive gain) when the distance is in the near-field of the antenna.