How to make a custom resolution in Ubuntu Linux 20.04

I made a custom resolution using the nvidia control panel under windows (3840x4320). But I don’t know how to do it in Ubuntu 20.04. Can someone give clear instructions n how to do this? I have a NVidia 2080Ti.
The nvidia-settings application doesn’t seem to allow me to do it.

X server display configuration
ViewPortIn: (enter resolution)

How do I save the applied custom resoltuion to a preset?

With a lot of hassle. Saving to xorg.conf won’t work because gnome-shell will always reset that.
in short, e.g. create a script

nvidia-settings -a CurrentMetaMode="DFP-0: nvidia-auto-select { ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0 }"

fill in the appropriate values for DFP-0 and ViewPortIn, then make it executable and create an autostart .desktop file to run it on login