function handlePagesForSmoothExperience() {
	const $pages = [...tag.getAll("wc-page")];
	for (let $page of $pages.slice(0, -1)) {
		$page.handler.replaceEl();
	}
}
Remove invisible pages from DOM and add them to the stack