enharmonic problems with inputting notes

Yes it looks this is the ‘problem’. When I respell the note with with the alt-+ key then the next note would be correct notated. It is strange that the notes after the keychange won’t be changed directly.