Cannot use Unreal engine with nvidia gpu

I am using unreal engine 4.23.0, I have explicitly specified use of NVIDIA GPU for unreal engine and epic games launcher using NVIDIA Control Panel. But when I run unreal engine and go to task manager, I see that Unreal engine is using GPU-0(the integrated one). I have also tried right clicking on the Unreal Engine icon and then choosing “run with HIGH PERFORMANCE NVIDIA PROCESSOR”. But still no luck. Can anyone help me with this ?

It won’t work properly trying to assign a program to use a specific GPU, instead you have to set the system to use the Nvidia GPU for everything as the global default in the Nvidia Control Panel.