### Summary

When using ansible-test network-integration command, no matching target is found if the target-prefixes.network file is referencing a target containing an underscore.

### Issue Type

Bug Report

### Component Name

ansible-test

### Ansible Version

```console
ansible --version
ansible [core 2.13.5.post0] (stable-2.13 b44cb7aa99) last updated 2022/10/23 22:23:42 (GMT +200)
  config file = None
  configured module search path = ['/home/warkdev/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/warkdev/ansible/lib/ansible
  ansible collection location = /home/warkdev/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/warkdev/ansible/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
  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

Linux ansible-dev 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux

### Steps to Reproduce

- Create a simple collection with a very simple integration test case.
- Add a target, as a_b_facts to test the corresponding module.
- Add a dummy network inventory (won't be used).
- Add the following target-prefixes.network file:

```
a_b
```

Try to run the following command:

```
ansible-test network-integration --inventory inventory.networking a_b_.*
```

Notice that the target isn't detected as a network target since the code is expecting only "a" as prefix for a network target.

The suspicious line is located here: https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/_internal/target.py#L627

### Expected Results

Matching test starting by network prefix a_b should be running

### Actual Results

```console
ansible-test network-integration --inventory inventory.networking a_b_.* -vvv
RLIMIT_NOFILE: (1024, 1048576)
Falling back to tests in "tests/integration/targets/" because "roles/test/" was not found.
FATAL: Target pattern not matched: a_b_.*
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
"""Return a tuple of targets from the given target iterable which match the given prefix."""
    aliases = set(alias for target in targets for alias in target.aliases)
    if prefix.endswith('/') and prefix in aliases:
        aliases.remove(prefix)
    matches = [alias for alias in aliases if alias.startswith(prefix) and '/' not in alias[len(prefix):-1]]
    if short:
        offset = len(os.path.dirname(prefix))
        if offset:
            offset += 1
            relative_matches = [match[offset:] for match in matches if len(match) > offset]
            if len(relative_matches) > 1:
                matches = relative_matches
    return tuple(sorted(matches))
def walk_internal_targets(
    targets: c.Iterable[TCompletionTarget],
    includes: t.Optional[list[str]] = None,
    excludes: t.Optional[list[str]] = None,
    requires: t.Optional[list[str]] = None,
) -> tuple[TCompletionTarget, ...]:
    """Return a tuple of matching completion targets."""
    targets = tuple(targets)
    include_targets = sorted(filter_targets(targets, includes), key=lambda include_target: include_target.name)
    if requires:
        require_targets = set(filter_targets(targets, requires))
        include_targets = [require_target for require_target in include_targets if require_target in require_targets]
    if excludes:
        list(filter_targets(targets, excludes, include=False))
    internal_targets = set(filter_targets(include_targets, excludes, errors=False, include=False))
    return tuple(sorted(internal_targets, key=lambda sort_target: sort_target.name))
def filter_targets(