This is compressing video recordings of a computer desktop. The frames don't change much so this isn't surprising.
Can you clarify this please? Does h.265 have some better deduplication compression or does reencoding apply something that the original recording could not, meaning h.264 would have the same benefit.
I strongly suspect that the difference here is between real-time compression that runs while capturing the screen recording, and less time-constrained offline compression during transcoding.