Could it be that Interpretation is on?
If so, Logic is arranging what you see, but there's no change on your MIDI notes.
When export, you export real MIDI notes.
You could try to adjust the MIDI note durations to what you really want to see (force legato, etc…).
If you change in the piano roll that's all, but if you do it with Region Parameters (Gate Time, etc…) you need to normalize these parameters to each region berofe you export the MIDI File.
I hope this works.