### Summary

When a path in a collection is a symlink to a directory, the symlink is replaced with an empty dir instead of either a copy of the symlink target or the original symlink.

collection source:
```
$ tree -Ap --noreport ~/my_namespace/testcollection/collection/roles/php/templates/etc/php
[drwxr-xr-x]  roles/php/templates/etc/php
├── [drwxr-xr-x]  7.3
│   └── [drwxr-xr-x]  fpm
│       └── [drwxr-xr-x]  pool.d
│           └── [-rw-r--r--]  www.conf.j2
└── [lrwxrwxrwx]  7.4 -> 7.3
```

collection after installation (from git source):
```
$ tree -Ap --noreport ~/.ansible/collections/ansible_collections/my_namespace/testcollection/roles/php/templates/etc/php
[drwxr-xr-x]  roles/php/templates/etc/php
├── [drwxr-xr-x]  7.3
│   └── [drwxr-xr-x]  fpm
│       └── [drwxr-xr-x]  pool.d
│           └── [-rw-r--r--]  www.conf.j2
└── [drwxr-xr-x]  7.4
```

role `meta/requirements.yml` contains the following:
```
collections:
  - name: my_namespace.testcollection
    source: git+file:///home/twouters/my_namespace/testcollection#/collection/
    version: 2022.31.0-coll5
    type: git
```

contents of collection tar.gz after `ansible-galaxy collection build` seems to still be correct:
```
$ tar -tvf my_namespace-testcollection-2022.31.0-coll5.tar.gz | grep -F roles/php/templates
drwxr-xr-x 0/0               0 2022-08-03 11:31 roles/php/templates/etc/php/
lrw-r--r-- 0/0               0 1970-01-01 01:00 roles/php/templates/etc/php/7.4 -> 7.3
drwxr-xr-x 0/0               0 2022-08-03 11:31 roles/php/templates/etc/php/7.3/
drwxr-xr-x 0/0               0 2022-08-03 11:31 roles/php/templates/etc/php/7.3/fpm/
drwxr-xr-x 0/0               0 2022-08-03 11:31 roles/php/templates/etc/php/7.3/fpm/pool.d/
-rw-r--r-- 0/0             430 2022-08-03 11:31 roles/php/templates/etc/php/7.3/fpm/pool.d/www.conf.j2
```

installation from tar.gz with `ansible-galaxy collection install --force my_namespace-testcollection-2022.31.0-coll5.tar.gz` is fine:
```
$ tree -Ap --noreport ~/.ansible/collections/ansible_collections/my_namespace/testcollection/roles/php/templates/etc/php
[drwxr-xr-x]  roles/php/templates/etc/php
├── [drwxr-xr-x]  7.3
│   └── [drwxr-xr-x]  fpm
│       └── [drwxr-xr-x]  pool.d
│           └── [-rw-r--r--]  www.conf.j2
└── [lrwxrwxrwx]  7.4 -> 7.3
```

### Issue Type

Bug Report

### Component Name

ansible-galaxy

### Ansible Version

```console
$ ansible --version
ansible [core 2.13.2]
  config file = /home/twouters/.ansible.cfg
  configured module search path = ['/home/twouters/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  ansible collection location = /home/twouters/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.5 (main, Aug  1 2022, 07:53:20) [GCC 12.1.0]
  jinja version = 3.1.2
  libyaml = True
```


### 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
$
```


### OS / Environment

Arch Linux

### Steps to Reproduce

See summary

### Expected Results

See summary. I expect to either have a copy of the symlink target or preferably the original symlink.

### Actual Results

```console
See summary
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
b_temp_path = tempfile.mkdtemp(dir=to_bytes(C.DEFAULT_LOCAL_TMP, errors='surrogate_or_strict'))
    try:
        yield b_temp_path
    finally:
        shutil.rmtree(b_temp_path)
@contextmanager
def _display_progress(msg=None):