Update
The hardware accelerated encoders do not support Constant Rate Factor (CRF, -crf) to determine size/quality ratio. You can check what the encoder supports, e.g. with ffmpeg -h encoder=hevc_nvenc -hide_banner. Dennis Mungai's detailed answer to 'How can I use CRF encoding with nvenc in ffmpeg?' at Superuser suggests to use -cq:v 19 and -rc:v vbr parameters instead to get constant quality with variable bitrate. You probably want to consider that to help in your case.
It worth noting that this is still different from CRF because constant quality, as it is determined by -cq, sets constant quantization parameter (CQP) instead. Here's a quote from the CRF Guide by
Werner Robitza explaining why CRF still allows to save bits in comparison to setting constant QP:
… The quantization parameter defines how much information to discard from a given block of pixels (a Macroblock). This typically leads to a hugely varying bitrate over the entire sequence.
Constant Rate Factor is a little more sophisticated than that. It will compress different frames by different amounts, thus varying the QP as necessary to maintain a certain level of perceived quality. It does this by taking motion into account. …
Original answer
ffmpeg wiki asserts that this is typical for hardware accelerated encoding:
Hardware encoders typically generate output of significantly lower quality than good software encoders like x264, but are generally faster and do not use much CPU resource. (That is, they require a higher bitrate to make output with the same perceptual quality, or they make output with a lower perceptual quality at the same bitrate.)
Peter Cordes suggested the following explanation as a part of his answer at Video Production Stack Exchange to 'Why processor is "better" for encoding than GPU?':
My understanding is that the search space for video encoding is SO big that smart heuristics for early-termination of search paths on CPUs beat the brute-force GPUs bring to the table, at least for high quality encoding. It's only compared to -preset ultrafast where you might reasonably choose HW encoding over x264, esp. if you have a slow CPU (like laptop with dual core and no hyperthreading). On a fast CPU (i7 quad core with hyperthreading), x264 superfast is probably going to be as fast, and look better (at the same bitrate).
If you're making an encode where rate-distortion (quality per file size) matters at all, you should use x264 -preset medium or slower. If you're archiving something, spending a bit more CPU time now will save bytes for as long as you're keeping that file around.