Duplicate frames always added to end of video

I am using 2.6.4 but this has happened for other versions.

When I upscale a video it will add 1-3 duplicate frames around 10ish still frames (not key frames) at the end of the video. When I use slowmo and lets say slowmo it at 800% as an example it will add about 30 duplicate frames which will break the flow of the video making it pause for a second then continue. I have also noticed if I am up scaling looping videos (often ones I find online), it will also sometimes add duplicate frames but cut out a frame or 2 as well completely ruining the flow of the loop.

My specs are windows 10 latest updates. 3090 64gb 5950x