How can I force my timeline to sync keyframes with the sound?

So I noticed some weird issues with synchronisation between sound and animations with my timeline animations.
I’ve not tested this on a build, but in the editor, if there’s a little bit of lag at some point while the timeline is playing, after the lag, the timeline will resume at the next keyframe. However, the audioclip meanwhile kept going, and this causes the animation not to be in sync with the sound anymore.

Is there a way to force timeline to respect realtime, or at least to catch up in some way when it’s behind?

There have been fixes to some synchronizing issues in recent versions of Unity (2021, 2020, 2019.4) - if you are using older versions that might fix some issues. If you require the timeline and audio to maintain perfect synchronization, use a DSP Clock update mode on the playableDirector. The timeline will run off the audio clock instead of the game clock, which avoids any drift.