Go to render settings, change to H.264 then there’s a button next to it to the right says something like “advanced” or “more options” or something. In there, change the level to 5.0 then make sure your frame rate matches your comp settings. I don’t know what this means or why it works but it does.
Thanks Kati, this tip works!