### 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
paths = extend_paths(default_test_collection_paths, parent_pkg)
            existing_child_paths = [p for p in extend_paths(paths, module_to_load) if os.path.exists(p)]
            is_builtin = 'ansible.builtin' in name
            if name in sys.modules:
                del sys.modules[name]
            loader = _AnsibleCollectionPkgLoader(name, path_list=paths)
            assert repr(loader).startswith('_AnsibleCollectionPkgLoader(path=')
            module = loader.load_module(name)
            assert module.__name__ == name
            assert isinstance(module.__loader__, _AnsibleCollectionPkgLoader)
            if is_builtin:
                assert module.__path__ == []
            else:
                assert module.__path__ == [existing_child_paths[0]]
            assert module.__package__ == name
            if is_builtin:
                assert module.__file__ == '<ansible_synthetic_collection_package>'
            else:
                assert module.__file__.endswith('__synthetic__') and os.path.isdir(os.path.dirname(module.__file__))
            assert sys.modules.get(name) == module
            assert hasattr(module, '_collection_meta') and isinstance(module._collection_meta, dict)
            
            
            if module._collection_meta:
                _collection_finder = import_module('ansible.utils.collection_loader._collection_finder')
                with patch.object(_collection_finder, '_meta_yml_to_dict', side_effect=Exception('bang')):
                    with pytest.raises(Exception) as ex:
                        _AnsibleCollectionPkgLoader(name, path_list=paths).load_module(name)
                    assert 'error parsing collection metadata' in str(ex.value)
def test_coll_loader():