Render fragments with uvs outside (0,1) range as transparent
Assuming that alpha works properly in the rest of the code it can be solved on shader level:
out vec4 color;
in vec2 uv;
uniform sampler2D tex;

void main() {
    color = texture(tex, uv);
    color.a = 0.0;
    if (all(greaterThan(uv, vec2(0.0))) &amp;&amp; all(lessThan(uv, vec2(1.0)))) {
        color.a = 1.0;
    }
}