I’m going to venture a guess here, and maybe someone more versed can back me up or set me straight
But here:
<?php echo htmlspecialchars($_SERVER['REQUEST_URI'])?>'
Is the redirect value…. It is redirecting to the original url, wherever the user came from
If you swap that out for your home url with something like:
<?php echo home_url( "https://wordpress.stackexchange.com/" ); ?>
I would think that would do it