Vector 3D effect over and under a layer

I want to create a 3D effect with a vector such that in this design,


The rightmost point of the vector comes above the container like this

I copied the vector and deleted the previous points but this does not make the gradient of the vectors “connect”