How to retain $_POST data when submitting form to custom page

I don’t know why your $_POST data disappears. However, consider using the admin_post/admin_post_nopriv hook to process the form data using a function on the back end. That’s what the function was made for. At the end of the function, you can then redirect to the account-pending page using this wp_redirect(home_url('/account-pending')) .