Backup the Mac (just in case).
Then "cd " to the desired folder. The check the contents with that "ls -al".
If there is a .DS_Store file, you can delete it with "sudo rm .DS_Store" (the "sudo" might be left out if you are the owner of that file. sudo prompts you for your admin password).
Or a safer way is to in Finder to display that invisible "dot file" with Shift-Command-. and then trash it the normal way ("sudo rm " command can be dangerous if the user does typos!!).
In the past I have successfully saved Finder windows with this but even then I had to follow a certain workflow with a reboot to make it work. Newer macOS might behave differently.