The gradient color fill is weird of Line.
In a specific perspective:


:(
Reporting a bug? please specify Unity version:
      
          2021.1.15f1c1
      
    Reporting a bug? please specify Shapes version:
      
          4.1.0
      
    Reporting a bug? please specify Render Pipeline:
      
          Built-in render pipeline
      
     
 
this is unfortunately a limitation in how rendering works with transparency and draw order, but you can solve it by using the opaque blend mode instead of transparent