You misunderstood me. I wasn’t talking about Replace in Files, I was talking about Replace All button in normal Replace dialog, designed for working with single, currently opened file. I mean that this button (Replace All) and the button Replace just above it, behave differently.
I apologize for misunderstanding. I reproduced this issue. Thanks!