fix #38991: cursor jump on up/down if layout changes

This is my proposed fix for an issue where up/down during note can possibly affect layout - the addition / removal of an accidental might change the number of measures that can fit on the line, as shown in the example in the issue report - and the note input cursor is not updated.

The code to move the cursor in Score::setPos() was only doing so if the tick had changed, but this ignores the possibility the cursor will need to be moved because the *layout* has changed even if the tick has not.  This PR definitely fixes that problem, and I don't see any other ill effects.  But I can't really be sure there aren't some cases where doing a moveCursor here would be a bad idea.