When my animation is played using the play button it plays until the end of the blue line above the frame numbers. This is defined by the range inputs.
But when I export the same animation, it stops at the last defined frame, see attached images.
There is a work around for this problem and that is to add a frame in any layer in the last frame position, as shown in Animated_GIF-2.png.
Apologies if this problem has been previously reported by another user.