Stroke line cap glitch on animated path


I’m working on an animation in After Effects, exporting to Lottie with Bodymovin.

I have an animated path (a line that makes a wave movement).
On that path I want to animate a stroke with trim paths.

That works fine, but the stroke cap glitches. If i remove the path animation, the cap doesn’t glitch anymore.

This is with the animated path (glitch):

This is on a still path (no glitch):

Is this a bug or something I can fix by tweaking some settings…? Thanks

(I had some issues previously with the rounded stroke caps so I (already) added an empty rectangle in the same shape layer.)

Edit: for some reason I can’t publish my animations to public right now… so links are not working.

Since the links aren’t working, is there a way you can do a screen recording and share the video for me to be able to check?