It's not that the temp gun becomes inaccurate the farther away it is. It takes a bigger sample size of the surface being measured. For example if you're using a spot light with a VERY tight beam maybe the surface is really only being heated an area of 1" diameter. Outside of that area the temp will be lower because of the spot light's narrow beam. When you take a measurement with the temp gun at close range the sample could be from only the 1" heated area. Then if you take a measurement from farther away the sample now might include area outside the 1" heat zone. Since it's cooler out there the temp on the gun will be lower because it takes an average temp of the sample area.
Since your readings are the same no matter how far away you have your gun I'd say that's because you have a setup that's heating the surface evenly over a larger area.
Also, the distance of the gun from the surface and the actual area that's being measured depends on the model gun.