### Summary

I'm packaging ansible-core for OpenIndiana.  During the construction of 2.15.0 package I noticed the `test_importlib_resources` test fails if there is already ansible/ansible_collections installed.

### Issue Type

Bug Report

### Component Name

test_collection_loader.py

### Ansible Version

```console
2.15.0
```


### Configuration

```console
NA
```


### OS / Environment

OpenIndiana Hipster

### Steps to Reproduce

Run tests in a working directory with `ansible` already installed.

### Expected Results

All tests pass.

### Actual Results

```console
___________________________ test_importlib_resources ___________________________
[gw2] sunos5 -- Python 3.9.16 /usr/bin/python3.9
@pytest.mark.skipif(not PY3, reason='importlib.resources only supported for py3')
    def test_importlib_resources():
        if sys.version_info < (3, 10):
            from importlib_resources import files
        else:
            from importlib.resources import files
        from pathlib import Path

        f = get_default_finder()
        reset_collections_loader_state(f)

        ansible_collections_ns = files('ansible_collections')
        ansible_ns = files('ansible_collections.ansible')
        testns = files('ansible_collections.testns')
        testcoll = files('ansible_collections.testns.testcoll')
        testcoll2 = files('ansible_collections.testns.testcoll2')
        module_utils = files('ansible_collections.testns.testcoll.plugins.module_utils')

        assert isinstance(ansible_collections_ns, _AnsibleNSTraversable)
        assert isinstance(ansible_ns, _AnsibleNSTraversable)
        assert isinstance(testcoll, Path)
        assert isinstance(module_utils, Path)

        assert ansible_collections_ns.is_dir()
        assert ansible_ns.is_dir()
        assert testcoll.is_dir()
        assert module_utils.is_dir()
    
        first_path = Path(default_test_collection_paths[0])
        second_path = Path(default_test_collection_paths[1])
        testns_paths = []
        ansible_ns_paths = []
        for path in default_test_collection_paths[:2]:
            ansible_ns_paths.append(Path(path) / 'ansible_collections' / 'ansible')
            testns_paths.append(Path(path) / 'ansible_collections' / 'testns')

        assert testns._paths == testns_paths
>       assert ansible_ns._paths == ansible_ns_paths
E       AssertionError: assert [PosixPath('/...ons/ansible')] == [PosixPath('/...ons/ansible')]
E         Left contains one more item: PosixPath('/usr/lib/python3.9/vendor-packages/ansible_collections/ansible')
E         Full diff:
E           [
E            PosixPath('$(BUILD_DIR)/test/units/utils/collection_loader/fixtures/collections/ansible_collections/ansible'),
E            PosixPath('$(BUILD_DIR)/test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/ansible'),
E         +  PosixPath('/usr/lib/python3.9/vendor-packages/ansible_collections/ansible'),
E           ]

test/units/utils/collection_loader/test_collection_loader.py:868: AssertionError
```

The package is being build in a working directory - `$(BUILD_DIR)` - while there is already [ansible_collections](https://pypi.org/project/ansible/) and previous version of `ansible-core` (version 2.14.5) installed in `/usr/lib/python3.9/vendor-packages` via the package manager.
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
finder = get_default_finder()
    reset_collections_loader_state(finder)
    paths = extend_paths(default_test_collection_paths, 'ansible_collections')
    modules = list(pkgutil.iter_modules(paths, 'ansible_collections.'))
    assert len(modules) == 2
    assert all(m[2] is True for m in modules)
    assert all(isinstance(m[0], _AnsiblePathHookFinder) for m in modules)
    assert set(['ansible_collections.testns', 'ansible_collections.ansible']) == set(m[1] for m in modules)
def test_collection_get_data():
    finder = get_default_finder()
    reset_collections_loader_state(finder)
    
    d = pkgutil.get_data('ansible_collections.testns.testcoll', 'plugins/action/my_action.py')
    assert b'hello from my_action.py' in d
    
    d = pkgutil.get_data('ansible_collections.testns.testcoll', 'bogus/bogus')
    assert d is None
    with pytest.raises(ValueError):
        plugins_pkg = import_module('ansible_collections.ansible.builtin')
        assert not os.path.exists(os.path.dirname(plugins_pkg.__file__))
        d = pkgutil.get_data('ansible_collections.ansible.builtin', 'plugins/connection/local.py')
@pytest.mark.parametrize(
    'ref,ref_type,expected_collection,expected_subdirs,expected_resource,expected_python_pkg_name',
    [
        ('ns.coll.myaction', 'action', 'ns.coll', '', 'myaction', 'ansible_collections.ns.coll.plugins.action'),
        ('ns.coll.subdir1.subdir2.myaction', 'action', 'ns.coll', 'subdir1.subdir2', 'myaction', 'ansible_collections.ns.coll.plugins.action.subdir1.subdir2'),
        ('ns.coll.myrole', 'role', 'ns.coll', '', 'myrole', 'ansible_collections.ns.coll.roles.myrole'),
        ('ns.coll.subdir1.subdir2.myrole', 'role', 'ns.coll', 'subdir1.subdir2', 'myrole', 'ansible_collections.ns.coll.roles.subdir1.subdir2.myrole'),
    ])
def test_fqcr_parsing_valid(ref, ref_type, expected_collection,