It may be the wrong .exe on the Program Settings whitelist. I did some more digging around and found these 3:
1)Type graphics settings into the windows search bar. Afterwards, select Classic app and browse to the Minecraft javaw.exe and add it. Select options and select your dedicated GPU, and try it in game.
2)In the Nvidia Control Panel, click the “Manage 3D Settings” option from the menu at the left, then click on the “Program Settings” tab.
Click on the “Add” button, and in the window that opens, click the “Browse” button. By default Minecraft uses its bundled version of Java, which can be found at C:\Program Files (x86)\Minecraft Launcher\runtime\jre-x64\bin
Enter that in the address bar at the top of the Browse window select javaw.exe, then hit “Open”. Note: If you have set the game to use a different version of Java, or the bundled Java gets updated, you will need to adjust the folder you use for this step.
It should then autoselect what you just added, but make sure the Java you just added is selected below the “Select a program to customize option”.
In the list below “Specify the settings for this program” scroll down until you see the option “OpenGL rendering GPU”, click the drop down menu next to it, and select your gpu.
Click on the Apply button, then close the Nvidia Control Panel and try to run the game again.
3)Again, Nvidia Control Panel > 3D settings > Program Settings, select Add.
For the file location, open a PowerShell (Win+R -> "powershell" -> "OK" or search it at Start) window and paste(right-click on the powershell window) and run the following command:
$a=Get-AppxPackage Microsoft.MinecraftUWP;$d="MinecraftUWP";Add-Type -AssemblyName Microsoft.VisualBasic;$e=[Microsoft.VisualBasic.Interaction];$e::InputBox("Install location:",$d,$a.InstallLocation);$e::InputBox("Game storage location:",$d,$env:LocalAppData+"\"+$a.PackageFamilyName+"\LocalState");exit;
A window will open with the "Install location". Copy everything in it and browse to it with the NVIDIA Control Panel. Then select "Minecraft.Win10.DX11" and press "Open".
In specify settings, select your gpu for OpenGL gpu and hit "Apply". Try and run the game again.