### Summary

In check mode, when I use ansible builtin module **ansible.builtin.copy** to copy a remote file or directory to a destination which ends with a `/`, it creates destination directory on remote host despite check mode is enabled.

### Issue Type

Bug Report

### Component Name

ansible.builtin.copy

### Ansible Version

```console
$ ansible --version
ansible 2.10.8
  config file = /home/user/.ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
```


### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
DEFAULT_BECOME_METHOD(/home/user/.ansible.cfg) = sudo
DEFAULT_ROLES_PATH(/home/user/.ansible.cfg) = ['/home/user/data/git/ansible/roles']
DEFAULT_SCP_IF_SSH(/home/user/.ansible.cfg) = True
```


### OS / Environment

Ansible controller OS is Debian bullseye.

### Steps to Reproduce

On ansible controller :
1. Create directory **/tmp/ansible-test**
   `$ mkdir /tmp/ansible-test`
2. Create empty file **/tmp/ansible-test/empty.txt**
   `$ touch /tmp/ansible-test/empty.txt`
3. Create playbook **/tmp/ansible-test/playbook.yml** with the following content
   ```yaml
   ---
   - hosts: localhost
     tasks:
       - name: copy file empty.txt into /tmp/ansible-test/not-existing-subdir/
         ansible.builtin.copy:
           remote_src: yes
           src: /tmp/ansible-test/empty.txt
           dest: /tmp/ansible-test/not-existing-subdir/
   ```
4. Run playbook
   `$ ansible-playbook --check /tmp/ansible-test/playbook.yml`

### Expected Results

Directory **/tmp/ansible-test/not-existing-subdir/** is not created after having run playbook (cf. step 3 in section **Steps to Reproduce**) in check mode

### Actual Results

```console
# Directory **/tmp/ansible-test/not-existing-subdir/** has been created by running playbook (cf. step 3 in section **Steps to Reproduce**) in check mode (cf. execution output below)


user@debian:/tmp/ansible-test$ ls -Al
total 4
-rw-r--r-- 1 user user   0 22 août  14:29 empty.txt
-rw-r--r-- 1 user user 239 22 août  15:16 playbook.yml
user@debian:/tmp/ansible-test$ ansible-playbook --check --diff /tmp/ansible-test/playbook.yml 
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] **************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ********************************************************************************************************************************************************************************************
ok: [localhost]

TASK [copy file empty.txt into /tmp/ansible-test/not-existing-subdir/] ********************************************************************************************************************************************
changed: [localhost]

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

user@debian:/tmp/ansible-test$ ls -Al
total 8
-rw-r--r-- 1 user user    0 22 août  14:29 empty.txt
drwxr-xr-x 2 user user 4096 22 août  15:19 not-existing-subdir
-rw-r--r-- 1 user user  239 22 août  15:16 playbook.yml
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
try:
            checksum_src = module.sha1(src)
        except (OSError, IOError) as e:
            module.warn("Unable to calculate src checksum, assuming change: %s" % to_native(e))
        try:
            
            md5sum_src = module.md5(src)
        except ValueError:
            pass
    elif remote_src and not os.path.isdir(src):
        module.fail_json("Cannot copy invalid source '%s': not a file" % to_native(src))
    if checksum and checksum_src != checksum:
        module.fail_json(
            msg='Copied file does not match the expected checksum. Transfer failed.',
            checksum=checksum_src,
            expected_checksum=checksum
        )
    
    if dest.endswith(os.sep):
        if _original_basename:
            dest = os.path.join(dest, _original_basename)
        b_dest = to_bytes(dest, errors='surrogate_or_strict')
        dirname = os.path.dirname(dest)
        b_dirname = to_bytes(dirname, errors='surrogate_or_strict')
        if not os.path.exists(b_dirname):
            try:
                (pre_existing_dir, new_directory_list) = split_pre_existing_dir(dirname)
            except AnsibleModuleError as e:
                e.result['msg'] += ' Could not copy to {0}'.format(dest)
                module.fail_json(**e.results)