Using strip trailing spaces can cause the view in the text area to shift so that the caret is at the bottom when saving. Caret is still in same relative position, scrollbar position has just shifted.
Solution: Disable the Strip Trailing Spaces option in the Editor settings.