Maybe you can achieve the form with a solution from the collection ?
ThickBorder2D ColorToTexture_FragmentShader