Hi,
Why do you use the replace function?
I think that you should simply use the wixLocation.to() function without using the replace function:
export function button9_click(event, $w) {
let prevPage=wixWindow.referrer;
let wixLocation.to(prevPage);
}
Good luck,
Tal