replace: true
will remove the users ability to navigate back in history which Im guessing you might not want, if you just want to replace the entire path try:
navigate('../newpath')
this will remove the entire route using the ..
and replace it with your new one.