The test file I used (note trailing whitespace on each line):
some spaces here
some more here
and again
The test command was :%s/here/there/. After running the command, affected lines still have their trailing whitespace.
This was on Vim 8.1 (my own compiled version).