This was resolved by copying the file <osticket root folder>/osta/old/include/staff/templates/dynamic-form-simple.tmpl.php to <osticket root folder>/include/staff/templates/dynamic-form-simple.tmpl.php as the changes for priority’s popup go back to that and copying it from vanilla version of OsTicket does about the same thing as manually changing the code in the file.
Also, after perusing the database visually, at some point OsTicket proper added a new column to the priority database for sorting the priorities independent of the number of the priority in the database. By updating all the priorities in the order, I want them I was able to fix sorting.