I have a script that I've used for several Photoshop releases to zoom an image window to 100% and expand it to fullscreen. I assign this to an action with a keyboard shortcut.
#target Photoshop
main();
function main(){
app.preferences.keyboardZoomResizesWindows = true;
runMenuItem(stringIDToTypeID('actualPixels'));
app.preferences.keyboardZoomResizesWindows = false;
return;
}
Starting with Photoshop 23, the window only expands to about 3/4 of the display. This happens on both MacOS Monterrey and Windows 10 Pro. I see the correct behavior on Photoshop 22.5.6 and with all previous versions back to at least CC2018.