Cleaning up code is a spectrum, not a binary.
There are clearly very small changes that do not change the input and output of a function, but can make it clearer.
The clearest example of this small change is a code formatter. The code changed. There's a diff, but none of the code means anything different.
On the other side, you have the idea of cleaning up a code base that refactors lots of code so that at the end in theory it means the same, but it better fits the domain.