Update: I had luck with turning off the option to show the key signature in every line in the print menu. Now it displays properly, showing the key signature only in the bar where it changes.