fix #20018: MIDI note input

Add call to MuseScore::endCmd() after processing MIDI note input,
so that the note is played and the cursor box position is updated.