Sync issues when exporting CodeMirror-edited subtitles into editor (delay between video and captions)

I’m working on a small web-based workflow where we use CodeMirror to create and edit subtitle files (mainly SRT/VTT) for video projects, and then import those subtitles into capcut for mac for final syncing and editing. The idea is to keep all subtitle editing structured and clean in CodeMirror first, especially when multiple editors are involved, before bringing everything into the video timeline.

However, I’m running into a consistent issue where the subtitles don’t perfectly align once imported into the editor, there’s a slight delay or offset between the video playback and when the captions appear. It becomes more noticeable in longer videos or when there are frequent scene cuts. Has anyone dealt with this kind of timing drift when moving SRT/VTT files from external editors, and is there a reliable way to ensure frame-accurate syncing during import?