The AppleScript dictionary for Preview is just abysmal and won't give you access to the image size panel in the application. It may be more straightforward to use Apple's scriptable image processing system (sips) to achieve this image manipulation goal. In the Terminal:
/usr/bin/sips -s format jpeg -s formatOptions 100 --resampleWidth 2048 -s dpiWidth 72.0 -s dpiHeight 72.0 --out newImg.jpg inImg.jpg
As an example, my portrait inImg.jpg has dimensions 3888 x 5184 and is a 300 DPI image. When I run the preceding sips command line above on it, the output newImg.jpg is 1365 x 2048 and 72 DPI. The sips utility does not work on camera RAW images.
I have a working Shortcuts Quick Action that takes one or more selected non-RAW images in the Finder and outputs the above settings with a filename of originalname_2048_72.ext. The original image is untouched.
I have only tested this Shortcut in macOS Sequoia v15.3.1. When you click that link, Shortcuts will offer to install the Shortcut for you. I have named it: Resample Image to 2048 px. You can edit it by right-clicking on the Shortcut and choosing Edit…

The sips(1) man page can be opened from your browser in a separate Terminal window with:
x-man-page://sips
or from the Terminal with the following command sequence:
mandoc -Tpdf -mdoc $(man -w sips) | open -f -a Preview