For your use case the best option is to run video off the intel integrated graphics and leave the DGPU entirely for compute.
That's how I have this very laptop configured, and also how I configured the workstations for the people here using GPUs for DL development (because a composited desktop will get very janky if you try to run it off a GPU currently being brought to its knees by a training process).