Bug: Adding a new instrument, making it visible on another instrument's part score, and then swapping their places causes issues with tempo markings.
I came across this issue while attempting to create a cue staff in a piece I was working on. I was able to reproduce it from a new score.
To reproduce the bug, first create a new score. Give it an instrument (I used violins), then go on to edit the score. To make it clear later which staff we're looking at, add a few notes. Then add a tempo marking. Next, add another instrument (I used solo violin). Open the original instrument's part, then under the Instruments panel, enable visibility for both instruments. Finally, swap their order by dragging the lower one above the upper one. The tempo marking now appears between the staves rather than staying at the top. If you then disable either instrument via the Instruments panel, it disappears altogether until both are visible again. This only happens on the part, though — switch to the score view, and it behaves exactly as expected.
I have logged this issue in Github as https://github.com/musescore/MuseScore/issues/22263