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.
This is expected behavior. The range selection at the top of the timeline is only meant for changing the preview playback range. If you want to set the exported frame range, there is a section for that in the export dialogs you’ve taken screenshots of. It is automatically set to between 1 and the final keyframe, but you can set the end to be before or after the last frame and it will making a shorter or longer export accordingly.