This mostly happens when changing from a sharp key to a flat key and vice versa. Different sets of notes and different keys lead to different spelling errors. Here are a few examples:
-
Entering the 7 diatonic notes in F# major and then changing the key to Db major results in scale degrees 4 to 6 being spelled F#, G#, A#.
-
When entering the 5 non-diatonic notes in F# major (by adding sharps) and then changing the key to Db major, the note between Gb and Ab is spelled F## and the note between Ab and Bb is spelled G## (which would be the triply augmented 4th scale degree in Db major).
-
When entering the 7 diatonic chords in F# major and then changing the key to Db major, the chords are spelled with a seemingly random mix of sharps and flats. Sometimes they’re spelled correctly with only flats, sometimes they’re spelled with only sharps and sometimes it’s a wild mix of both. The result changes every time. This way you can even get enharmonic equivalents within a single chord like on this screenshot (Ab in the left hand, G# in the right hand):