In the Windows OS, navigate to: Start > Settings > System > Display > Graphics.

In this menu, use "Add desktop app" then locate the game folder, in the folder you'll see two sub-folders, select "game" and then click on the "ffxiv_dx11.exe" and add it to the list.
Once added, select it in the list of programs/apps "Final Fantasy XIV", set it to use "Nvidia Geforce RTX 5070 Ti" and flip the little button below to On or Off for the Optimize Windowed games, I would try it set to On and test the game, then Off, you may get some results, it's hit or miss, worth testing.

Secondly, if the above doesn't yield results, you can try setting the game to Fullscreen mode in the in-game Display setting menu, this should fix the issue of random framerate fluctuation, but is not ideal, try it and see if it improves.