How to fix the position of a gradient in Illustrator, so that it doesn't move when I edit the object it's applied to?
How do I make Illustrator not change the gradient's position and size when I change the path's shape?
You could do this by using a second path and a clipping mask:
Original shape with the second shape
Right click to the document with both shapes selected