Subtitles and dubs both have different criteria.
Dubs must match when the person is speaking or appears to be. This may mean that a speaker says a single word, but the translation would be a phrase in another language. This means the dub will be very short, but the sub may be longer.
Dubs must match the mouth movements to some extent. Like if a person has an open mouth, elongating/screaming one word, it would be strange for it to be dubbed into multiple words.
Subs on the other hand are limited by the size of the screen. And they must also take in account reading speed. In the above example, if the speaker says one word, which would translate into a phrase in another language, if the time before the next speaker is short, there is not enough time to read a long subtitle.
Point is, both have different criteria and they have little motivation to align both subtitles and dubs, as it’s not super common to use both dubs and subtitles. Furthermore, my guess is that they can be done by two separate people/companies: one which sells dubbing services, while another sells subtitle services.
This is an issue, which has been around for years for language learners wanting to watch a dubbed movie with subs on. Since Whisper, Language Reactor has a paid feature for ‘sub a dub’. @roosterburton’s Netflix Audio Downloader was designed for such a purpose too, from my understanding (and Netflix movies without subtitles). I haven’t tried them myself, but if you’re into watching dubbed content, I’d say they are worth trying out, if the language you are learning works well with Whisper.
My preference is to watch original content in the languages I’m learning, if I want to watch with subtitles on. Not too long ago, Netflix added a filter to only show original content by language. I only get the option to filter for the language of the country I’m VPNing through though (when watching Netflix, I only VPN through the country of the language I’m learning to get the most content related to that language).