Interestingly, In starting to look into doing some re-encodes of some of my media to reduce disk space. Ran into an interesting one as I was doing some test files where the h265 file ended up being 30% bigger than the originating h264 (1.8GB to 2.4GB, Handbrake 1080p h265 fast RF 20). All my other test files were about a 50% reduction.
That is to say, there is no one singular set of settings that are perfect.