### 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
artifacts_manager,  
):  
    """Download Ansible collections as their tarball from a Galaxy server to the path specified and creates a requirements
    file of the downloaded requirements to be used for an install.
    :param collections: The collections to download, should be a list of tuples with (name, requirement, Galaxy Server).
    :param output_path: The path to download the collections to.
    :param apis: A list of GalaxyAPIs to query when search for a collection.
    :param validate_certs: Whether to validate the certificate if downloading a tarball from a non-Galaxy host.
    :param no_deps: Ignore any collection dependencies and only download the base requirements.
    :param allow_pre_release: Do not ignore pre-release versions when selecting the latest.
    """
    with _display_progress("Process download dependency map"):
        dep_map = _resolve_depenency_map(
            set(collections),
            galaxy_apis=apis,
            preferred_candidates=None,
            concrete_artifacts_manager=artifacts_manager,
            no_deps=no_deps,
            allow_pre_release=allow_pre_release,
            upgrade=False,
            
            include_signatures=False,
            offline=False,
        )
    b_output_path = to_bytes(output_path, errors='surrogate_or_strict')
    requirements = []
    with _display_progress(
            "Starting collection download process to '{path!s}'".
            format(path=output_path),
    ):