VST Midi out of sync when looping

Hi
Tried everything above including buffer size and asio guard
Still having this issue i can’t get rid off!
Also its a known bug in cubasis.
Does anyone here really solved this??
In my case its riffer but with a real synth too
Damn