Are you using the same input to test the H264 and H265? It may be a problem with the input, or some bug. Can you share the input video if its not private?
It's the same input, only thing I changed was the codec. It was just a random Instagram story video I downloaded to try this on, don't remember which it was anymore. I'll try other videos and see if it happens as well.