How to initiate password reset flow by code

According to the WordPress Code Reference you have to pass the user object to get_password_reset_key() instead of the mail address. Maybe a solution for your problem will be:

$user = get_user_by( 'email', '[email protected]' );
$reset_key = get_password_reset_key( $user );