For everyone who is experiencing the same problem, the following might be a work-around:
If the domain you are moving the wordpress from is LONGER than the new domain, make a subdirectory counting exactly the amount of missing characters, so it equals the original amount. for example, old domain was 12345.com, new domain is 123.com, make a 1 character folder 123.com/a (the slash is also a character).
Upload your files to that directory, find and replace all old domains by the new one with the subfolder, and open up the admin panel. Go to settings, and change the site URL from inside the admin panel to the new domain, 123.com (so you change it from 123.com/a to 123.com).
I think wordpress changes all domains in the database in a correct way. Your site won’t work until you also moved all the files on the server (using ftp) to the root of 123.com.
I did not test it, but it could work ??