Can I use HiDPI for pixel-perfect photo editing?

Yes. Choose a display mode whose rendered pixel dimensions match the panel’s native dimensions, then use the photo editor’s pixel-level zoom. HiDPI itself does not prevent one-to-one mapping. Resampling a larger rendered desktop down to the panel is what changes that mapping.

The macOS scaling explanation compares fractional scaling and pixel mapping.

For a 3840 × 2160 panel, 1920 × 1080 HiDPI renders at 3840 × 2160 and can preserve that mapping. 2560 × 1440 HiDPI renders at 5120 × 2880 before being reduced to the same panel, so the final display image is resampled. Native 3840 × 2160 LoDPI is another matching mode, with smaller interface elements. These examples assume the display receives its native signal without further scaling by the monitor or a streamed presentation.

In Photoshop, 100% is the pixel-level inspection view. The image’s apparent size can change when you change display modes even though the file’s pixel dimensions remain unchanged. A 100% zoom label in the editor does not cancel scaling elsewhere in the display path. See Adobe’s image-viewing instructions.

You can keep a comfortable scaled desktop for ordinary editing and switch to a native-mapped mode when judging individual pixels or sharpening. See HiDPI and image sharpness for the difference between rendering detail and the panel’s physical pixels.