### Summary

I have an inventory with two hosts, say H1 an H2.
On H2, I execute a task with `delegate_to: H1`. It seems, however, that the task is eventually executed on H2.


### Issue Type

Bug Report

### Component Name

core

### Ansible Version

```console
$ ansible --version
ansible [core 2.11.5] 
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/mrks/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /home/mrks/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.7 (default, Aug 31 2021, 13:28:12) [GCC 11.1.0]
  jinja version = 3.0.2
  libyaml = True
```


### Configuration

```console
$ ansible-config dump --only-changed
<none>
```


### OS / Environment

Arch Linux

### Steps to Reproduce

Playbook:
```yaml
- hosts: H2
  tasks:
  - shell: hostname
    register: foo
    delegate_to: H1
  - debug:
    var: foo
```


### Expected Results

Expected foo.stdout = 'H1'.

By the way, I am pretty sure that this worked for a long time.

### Actual Results

```console
TASK [shell] *******************************************************************
changed: [H2 -> H1]

TASK [debug] *******************************************************************
ok: [H2] => {
    "foo": {
...
        "stdout": "H2",
        "stdout_lines": [
            "H2"
        ]
    }
}
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
'''
        Takes a executable (ssh, scp, sftp or wrapper) and optional extra arguments and returns the remote command
        wrapped in local ssh shell commands and ready for execution.
        :arg binary: actual executable to use to execute command.
        :arg subsystem: type of executable provided, ssh/sftp/scp, needed because wrappers for ssh might have diff names.
        :arg other_args: dict of, value pairs passed as arguments to the ssh binary
        '''
        b_command = []
        conn_password = self.get_option('password') or self._play_context.password
        #
        
        #
        
        
        pkcs11_provider = self.get_option("pkcs11_provider")
        if conn_password or pkcs11_provider:
            if not self._sshpass_available():
                raise AnsibleError("to use the 'ssh' connection type with passwords or pkcs11_provider, you must install the sshpass program")
            if not conn_password and pkcs11_provider:
                raise AnsibleError("to use pkcs11_provider you must specify a password/pin")
            self.sshpass_pipe = os.pipe()
            b_command += [b'sshpass', b'-d' + to_bytes(self.sshpass_pipe[0], nonstring='simplerepr', errors='surrogate_or_strict')]
            password_prompt = self.get_option('sshpass_prompt')
            if not password_prompt and pkcs11_provider:
                
                password_prompt = 'Enter PIN for '
            if password_prompt:
                b_command += [b'-P', to_bytes(password_prompt, errors='surrogate_or_strict')]