The following script will cycle over all open docs and fit to screen. Although It can be set to run via the Script Events Manager using the Open event, this would repeat the script for each document opened (the script is fast, but it seems pointless using this via the Open event). I have tested using a small batch of Raw files from ACR with prefs set to open as floating windows and the initial sort order is maintained.
/*
https://community.adobe.com/t5/photoshop-ecosystem-discussions/fit-to-screen-script-shuffling-file-sequence/m-p/13570962
v1.0, 11th February 2023, Stephen Marsh
*/
#target photoshop
if (app.documents.length) {
for (var i = 0; i < app.documents.length; i++) {
app.activeDocument = app.documents[i];
fitOnScreen();
}
} else {
alert('You must have a document open!');
}
function fitOnScreen() {
var idselect = stringIDToTypeID("select");
var desc1394 = new ActionDescriptor();
var idnull = stringIDToTypeID("null");
var ref710 = new ActionReference();
var idmenuItemClass = stringIDToTypeID("menuItemClass");
var idmenuItemType = stringIDToTypeID("menuItemType");
var idfitOnScreen = stringIDToTypeID("fitOnScreen");
ref710.putEnumerated(idmenuItemClass, idmenuItemType, idfitOnScreen);
desc1394.putReference(idnull, ref710);
executeAction(idselect, desc1394, DialogModes.NO);
}
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html