##### SUMMARY
When you have a task variable defined in the task's `vars:` directive and it relates to the connection, shell, or become plugin that is used in that task it will no longer be defined if run on a loop. The variable is present for the first iteration of the loop but future ones will remove that variable causing all sorts of different behaviour.

There is an unfortunate side effect of https://github.com/ansible/ansible/pull/59024 as it just removes the variables from the task vars.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
task_executor

##### ANSIBLE VERSION
```paste below
devel
```

##### CONFIGURATION
N/A

##### OS / ENVIRONMENT
N/A

##### STEPS TO REPRODUCE
Run the following playbook
```yaml
---
- hosts: localhost
  gather_facts: no
  tasks:
  - ping:
    vars:
      ansible_remote_tmp: /tmp/test1
    with_items:
    - 1
    - 2

  - debug:
      var: ansible_remote_tmp
    vars:
      ansible_remote_tmp: /tmp/test1
    with_items:
    - 1
    - 2
```

##### EXPECTED RESULTS
Both runs will use `/tmp/test1` as the remote temp directory that stores the AnsiballZ payload.

##### ACTUAL RESULTS
Only the 1st task uses `/tmp/test1` while the 2nd goes back to using the default as `ansible_remote_tmp` from the task vars is no longer defined.

```paste below
ansible-playbook 2.9.0.dev0
  config file = /home/jborean/dev/ansible-tester/ansible.cfg
  configured module search path = ['/home/jborean/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/jborean/dev/ansible/lib/ansible
  executable location = /home/jborean/dev/ansible/bin/ansible-playbook
  python version = 3.7.4 (default, Jul 10 2019, 15:18:20) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)]
Using /home/jborean/dev/ansible-tester/ansible.cfg as config file
host_list declined parsing /home/jborean/dev/ansible-tester/inventory.ini as it did not pass its verify_file() method
auto declined parsing /home/jborean/dev/ansible-tester/inventory.ini as it did not pass its verify_file() method
yaml declined parsing /home/jborean/dev/ansible-tester/inventory.ini as it did not pass its verify_file() method
Parsed /home/jborean/dev/ansible-tester/inventory.ini inventory source with ini plugin

PLAYBOOK: test.yml **************************************************************************************
1 plays in test.yml

PLAY [localhost] ****************************************************************************************
META: ran handlers

TASK [ping] *********************************************************************************************
task path: /home/jborean/dev/ansible-tester/test.yml:5
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: jborean
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /tmp/test1/ansible-tmp-1563847217.167148-225396898656963 `" && echo ansible-tmp-1563847217.167148-225396898656963="` echo /tmp/test1/ansible-tmp-156384
7217.167148-225396898656963 `" ) && sleep 0'
Using module file /home/jborean/dev/ansible/lib/ansible/modules/system/ping.py
<127.0.0.1> PUT /home/jborean/.ansible/tmp/ansible-local-245768n0yb3g5/tmpbf7ibfe5 TO /tmp/test1/ansible-tmp-1563847217.167148-225396898656963/AnsiballZ_ping.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /tmp/test1/ansible-tmp-1563847217.167148-225396898656963/ /tmp/test1/ansible-tmp-1563847217.167148-225396898656963/AnsiballZ_ping.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/home/jborean/venvs/ansible-py37/bin/python /tmp/test1/ansible-tmp-1563847217.167148-225396898656963/AnsiballZ_ping.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /tmp/test1/ansible-tmp-1563847217.167148-225396898656963/ > /dev/null 2>&1 && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'echo ~jborean && sleep 0'
ok: [localhost] => (item=1) => {
    "ansible_loop_var": "item",
    "changed": false,
    "invocation": {
        "module_args": {
            "data": "pong"
        }
    },
    "item": 1,
    "ping": "pong"
}
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/jborean/.ansible/tmp/ansible-tmp-1563847217.3545752-117775520192534 `" && echo ansible-tmp-1563847217.3545752-117775520192534="` echo /home/jbore
an/.ansible/tmp/ansible-tmp-1563847217.3545752-117775520192534 `" ) && sleep 0'
Using module file /home/jborean/dev/ansible/lib/ansible/modules/system/ping.py
<127.0.0.1> PUT /home/jborean/.ansible/tmp/ansible-local-245768n0yb3g5/tmpl2ss9stw TO /home/jborean/.ansible/tmp/ansible-tmp-1563847217.3545752-117775520192534/AnsiballZ_ping.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/jborean/.ansible/tmp/ansible-tmp-1563847217.3545752-117775520192534/ /home/jborean/.ansible/tmp/ansible-tmp-1563847217.3545752-117775520192534/AnsiballZ_ping.py && sl
eep 0'
<127.0.0.1> EXEC /bin/sh -c '/home/jborean/venvs/ansible-py37/bin/python /home/jborean/.ansible/tmp/ansible-tmp-1563847217.3545752-117775520192534/AnsiballZ_ping.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/jborean/.ansible/tmp/ansible-tmp-1563847217.3545752-117775520192534/ > /dev/null 2>&1 && sleep 0'
ok: [localhost] => (item=2) => {
    "ansible_loop_var": "item",
    "changed": false,
    "invocation": {
        "module_args": {
            "data": "pong"
        }
    },
    "item": 2,
    "ping": "pong"
}

TASK [debug] ********************************************************************************************
task path: /home/jborean/dev/ansible-tester/test.yml:12
ok: [localhost] => (item=1) => {
    "ansible_loop_var": "item",
    "ansible_remote_tmp": "/tmp/test1",
    "item": 1
}
ok: [localhost] => (item=2) => {
    "ansible_loop_var": "item",
    "ansible_remote_tmp": "VARIABLE IS NOT DEFINED!: 'ansible_remote_tmp' is undefined",
    "item": 2
}
META: ran handlers
META: ran handlers

PLAY RECAP **********************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
```

This is because after the first loop, all task vars that are either options for the connection, shell, and become plugin for that task are removed.
if isinstance(res, UnsafeProxy):
                    return res._obj
                elif isinstance(res, binary_type):
                    return to_text(res, errors=errors)
                elif isinstance(res, dict):
                    for k in res:
                        try:
                            res[k] = _clean_res(res[k], errors=errors)
                        except UnicodeError:
                            if k == 'diff':
                                
                                
                                display.warning("We were unable to decode all characters in the module return data."
                                                " Replaced some in an effort to return as much as possible")
                                res[k] = _clean_res(res[k], errors='surrogate_then_replace')
                            else:
                                raise