It has to do with your browsers history.
Difference between assign() and replace()
window.location.assign("url") causes a new document to load, while adding the current to the history.
window.location.replace("url") will replace the current document. It replaces the history in the browser so you can’t go back.
|assign()||Loads a new document||Preserves History|
|reload()||Reloads the current document|
|replace()||Replaces the current document with a new one (Loads a document)||Replaces History|