If you sort by name and rename something then it will move to its new position when you push return.
You can push tab to keep renaming and jump to the next file if you need to rename several in succession. They will only be sorted when you push return on the last file.
(We may have an option to not sort at all after renaming as well, but I’m not at my PC at the moment so I can’t check easily. But it’s also not something you should need in most situations.)
For the default image viewer, please see the FAQs.
Turning off Preferences / File Operations / Copy Options / Sort newly created and copied files will leave (inline-)renamed files where they were instead of re-sorting them after a rename.
By the way, Alt+Print Screen will put the active window into the clipboard, and you can then use Ctrl+V to paste it directly into a reply on the forum. That should be quicker than taking photos of your screen, and is also much easier for people to read.
FYI. If you go to Settings > Preferences you can type, for example, sort into the search field (bottom left) and the preferences dialog will filter out anything with sort in its name. A very useful feature.