On Pywikibot version 7.7.0 everything works and there are no spaces. The problem is on versions 8+ and 9+.
I give the command python pwb.py replace -file:blah.txt -pairsfile:allwords.txt
it only changes the text in the wiki article where there are line breaks. (enter). That is, if in the article "a" and "b" are in a line, it will not change to "c" and "d", but if in the column
"a"
"b"
it will change.
The same computer, it is the same version of Python. Only different Pywikibot. 7.7.0 and 9.5.0.
log and screen

