1- Increasing the margin.
2- Disabling Mipmaps.
It may not be recommended. Only if the texture is very small.
3- Using a square mask, or making the square programatically. It may need a saturate node when using linear interpolate.
4- Alpha Step node.