Midi and Audio Doesn't sync with the tempo track.

Hello

I have been working on a project and have noticed that both Audio tracks and midi tracks are playing slightly late to the metronome as if they were a few samples off the beat. All of the audio and midi tracks are perfectly aligned with the Tempo grid so it is really weird. I also noticed that when I export my track and Import it in to a project which has the same bpm then you can see the wave form physically of misaligned with the tempo grid.

Please let me know when ever this could be due to latency and if you have any possible solutions.