Bars and ruler not aligned

For me the thick lines I think you refer to might be sustain pedal data. You didn’t copy the pedal data, that’s why it is not there in your pasted part in your third screenshot.

Cheers
Dirx