virtual instrument latency issue?

if i record in a melody on the piano over a drum track it sounds fine while playing live, but then when i play it back it’s out of time and i have to manually alter them. i’ve not noticed it being not so bad in the past but lately it’s very bad
i can’t verify if this is worse the more instruments i have going and the more the cpu is working, i’ve just noticed it a lot lately.

i think my buffer is set to 256 i think from memory there is a 7ms delay,(can’t check at the moment) but seems fine when recording it’s the playback after recording that is off
automatic quantise is not on or anything.

my specs below

cubase 9.5.30
mac i5 2.7 32mb ram
universal audio apollo 8 interface
usb midi keyboard going into a powered usb hub then into the mac


Latency would be apparent when playing live/recording, should be fully compensated when playing back so something weird is going on.
Does the recorded MIDI look to be in time on the grid?

if I enable the compensation delay button it records and plays back on time, but some vst effects are then disabled.
my latency is input 11.477ms my output latency is 5.4ms buffer 256

so you can see I play it in with 11ms latency notes sound on time, it recorded my midi notes as I play them but with 5ms output latency they play slightly ahead of the time because the latency is less so the notes are always forward.
not sure if it’s the apollo 8 universal audio interface or something else, if I could get the about output latency to match up it would be on time

Are they playing ahead of where they have been placed or has Cubase placed them earlier than it should have? I’ve seen both in the past…

after 4 hours tonight puzzling, it seems to be Kontakt instruments that is the issue, I loaded ni battery and if I record hi hats in for example they are pretty much spot on when I hit playback. if I load a wav file into Kontakt of a hi hat and record it , the notes are ahead and complete off time,
so I’m looking into why Kontakt would behave like this.