Redirect after empty register form

I think I found the solution myself. When I adjusted the declaration of the registration form:

<form name="registerform" id="registerform" action="<?php echo esc_url( site_url('wp-login.php?action=register', 'login_post') ); ?>" method="post" novalidate="novalidate">    

To the following:

<form name="registerform" id="registerform" action="<?php echo esc_url( site_url('wp-login.php?action=register&role=".$_GET["role'], 'login_post') ); ?>" method="post"  novalidate="novalidate">    

Then my problem is solved and the registration page is not redirected to the standard registration url.

I hope this can help other persons too.