as far as I know that’s not a bug. The file you added after you removed the other is there in the playlist but it is not in the default slot anymore. So when you replace the file that way you need to open the hamburger menu on the media player and select the new song you selected.
original file before replacement
media player after old one is removed and new file is added, notice there is no track loaded yet
use hamburger menu to load the track, notice that (None) replaced your original file’s slot and the new file you added is directly below it. Selecting it will move it to the top position.
Another way that loads the file immediately into the top slot is to drag and drop the file directly onto the track field. In this case it recognizes that there is a file already there so it assigns a track number to the one you dragged over and moves it to the top of the playlist in one go.
It’s been that way since the start as far as I remember. Anyway, I hope it explains it.