You want 1 screen pixel line across the sprite even if sprite is scaled? I'm assuming that you do. In which case you'll need a little help from the vertex shader:
shader_type canvas_item;
render_mode blend_mix;
uniform float lineWidth = 1.0; // line width in screen pixels
uniform float lineOffset = 0.0; // line offset in screen pixels
uniform vec4 lineColor = vec4(1.0, 0.0, 0.0 ,1.0);
varying vec2 pivotWorld;
varying vec2 pixelWorld;
void vertex(){
pivotWorld = (WORLD_MATRIX * vec4(0.0, 0.0, 0.0, 1.0) ).xy;
pixelWorld = (WORLD_MATRIX * vec4(VERTEX, 0.0, 1.0) ).xy;
}
void fragment() {
float s = step(lineWidth/2.0, abs(pivotWorld.y - pixelWorld.y + lineOffset));
COLOR = mix(lineColor, texture(TEXTURE, UV), s);
}