UPDATE:
If you run the following commands and disable power savings on HandBrake then all cores will be used even when in the background. I've set my priority to handbrake to low so I can run it 24/7 and still have other foreground apps be responsive.