Pixel snapping, or in more general, being exact is kind of your enemy here. Being exact makes you vulnerable to an off-by-one error. A safety margin is what protects you from such errors, hence my original one-word comment under your question (sorry! I consider my knowledge intermediate and happily give ground to true experts).
First part is simplifying the problem to an Image Texture node with Interpolation Mode set as Nearest. I believe you have it set, if you don't have the reported problem before scaling down your texture - but since we don't see your project, we can't say - perhaps you have a margin, but one too small (it becomes subpixel after scaling down), or maybe the original resolution is high enough that the artifact is not visible at the zoom level you test your setup in, etc...
1. Scaling down the texture
Create a plane, in Edit Mode S, X, ., 5, Enter to scale it to 50% width, ShiftD, Y to duplicate and move it "below" (in top view), as for shading, just use the 100x100 image texture shown in first row of the table below:
👈 Closest interpolation!
In UV Editing for one face S, X, ., 5, Enter to scale accordingly to mesh size, G, X, ., -, 2, 5, Enter to align to left border, likewise with the other face but without - so it's aligned to the right border...
Add Array modifier and we have our setup ready:
Starting with 100x100 texture, left and right halves with different colors:
zoom on center of texture:
When scaling 50% down to 50x50 in Photoshop, using Bilinear resampling, the effect is exactly the same, so just posting the texture:
and zoom:
With different resampling, there are some small artifacts already, but let's just jump to a case where it's much more visible, by scaling again 50% down, so now the size is 25x25:
texture |
algorithm |
zoom |
|
bilinear |
|
|
nearest |
|
The antialiased region in bilinear version has been eaten by one of the regions (here: orange). What happened? First blue area had 50px width, then you divided it by 2 and it had 25px width, then you divided it by 2 and it had 12.5 px width. Because it's a raster image, the middle pixel could be either blue, orange, or an average (interpolation) of the two. Turning antialiasing off didn't help; using "nearest neighbor" algorithm in Photoshop makes the middle column orange; it means ${0.5 \over 12.5} = 4\%$ of the surface that's supposed to be blue, now becomes orange. In some cases it can be quite visible, for example if two regions connecting on UV map don't describe two regions connecting in geometry, or if it's a normal map in tangent space as in this question: How do I fix these normal map edges?
Since Hamed asked in comments, let's prove it by comparing the two:
25x25 bilinear ______________________ 25x25 nearest neighbor
The bottom plane works, because orange region became "greedy". However as mentioned above, blue color lost 4% of surface.
2. Interpolation inside of Blender
You probably want to have interpolation enabled, however, due to how it works, points with coordinates between center of a pixels on an edge and a pixel outside the edge of a region, will have their color calculated as an interpolation of those two (or more) pixels; for example, looking at the problem 1-dimensionally, using the 100 px wide texture, if color is calculated for a point at x = 99.8% of width, since it's beyond the last blue pixel's center (which is at 99.5% of width, as it defines color between 99% and 100% of width), the color will be an interpolation of nearest pixel, and the next pixel, which is outside the region defined in UV:
And so in linear interpolation, the resulting color will be ${a \over a+b} \times c_1 + {b \over a+b} \times c_2$.
You could wonder why software (not necessarily just Blender) doesn't clamp the value so it's not interpolated outside its UV region, but it wouldn't solve the problem, at least not entirely: for example if you had a gradient, clamping would mean that for a distance of 0.5 px (and then again for same distance on the other side) the color would be constant, which you would absolutely see in cases like zoom-ins or animation.
Solution
Finally! With 100x100 texture loaded, create another UV mapping:
U, U again to Unwrap, in UV Editor UV menu -> Pack Islands, expand the pop-up and set the margin. Now bake with standard settings:
Now switch the UV to the new one by clicking on the camera icon next to it. Save your baked image, open in a program of your choosing, scale down arbitrarily (you can still scale down too much depending on how small your margins are, save the texture, load back in Blender, everything should work even in linear interpolation mode, no artifacts - however, in my UV map above, one of the boundaries touches the edge, therefore extension mode has to be changed to Extend - in Repeat, you get the same orange/blue interpolation problem, and in Clip you're interpolating with black on the problematic edge.