Try with Edit->Preferences->Editor->Display->Stop scrolling at last line unset.
Sometimes the issue appears and sometimes not.
I'd say this is intended behaviour, ...
My expectation is (even I don't understand what is going on when toggling, and even if I don't know how the issue could be solved): The highlighted line and specially the blinking cursor should be in the visible area. The best would be that, if there is no change in the text and if there is no move of the cursor during the toggling process, then the blinking cursor should be exactly at the same place like it was before toggling.