You've got two completely different hardware things there. The first is GPU use (Mercury Acceleration setting), and the second is H.264/5 encoding which depends on your CPU/motherboard hardware capabilities for long-GOP encoding. Not a GPU thing at all.
Premiere's use of GPU is confusing for so many users.
It does not routinely use the GPU as an assistant to the CPU. The GPU is used for very specific things, mostly color and major resizing operations. They have a "GPU Accelerated Effects" list that shows what the GPU is used for.
And, in the Effects panel, you can see the "lego blocks" listed for each effect ... whether they're GPU-accelerated, 32-bit float, or YUV ... and if you don't see a lego block for one of those, it doesn't have that coding.
So while it is processing a clip that has hefty Lumetri or Warp or resizing going on, the GPU will get called on as the CPU gets to what it needs from the GPU.
Other than that, it doesn't use the GPU that much.
As to the "hardware encoding" for long-GOP H.264/5 format/codecs, that is totally dependent on your CPU having the hardware bits for such encoding. Not at all a GPU thing.
But very confusing, as both for GPU use and for H.264/5 encodes they use the phrases of hardware or software encoding.
And ... a note on long-GOP hardware vs software encoding: hardware is faster, but software frequently does a better/prettier job of the encode.