Legato doesn't work 100% of the time - for me anyway

I had had this on and off but just been manually fixing without thinking thought I’d ask a question here… just in case I’m missing something

Why this example some notes are not being extended to the end of the midi part and also not all notes are being Legato in these simple chords