### Summary

trying to list tags from a playbook with --list-tags option show empty lists for "all" TAGS nor for "task" TAGS



### Issue Type

Bug Report

### Component Name

ansible-playbook

### Ansible Version

```console
$ ansible --version
ansible [core 2.14.3]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/stannum/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  ansible collection location = /home/stannum/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.10 (main, Mar  5 2023, 22:26:53) [GCC 12.2.1 20230201] (/usr/bin/python)
  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
CONFIG_FILE() = /etc/ansible/ansible.cfg
```


### OS / Environment

Arch Linux

### Steps to Reproduce


<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)

ansible-playbook -i inventory.yaml test.yaml --list-tags

yaml file below:
---
- hosts: all

  tasks:

    - name: Configuring iscsi directory structure
      tags:
        - never
        - raidix_host
      when: inventory_hostname in groups['closed_circuit_kvm_hosts'] and item.state == 'directory'
      become: yes
      ansible.builtin.file:
        path: /etc/iscsi/nodes/{{ item.path }}
        state: directory
        owner: root
        group: root
        mode: u=rw,g=,o=
      with_community.general.filetree: files/etc/iscsi/nodes/
      notify:
        - restart iscsi service

    - name: Configuring iscsi service
      tags:
        - never
        - raidix_host
      when: inventory_hostname in groups['closed_circuit_kvm_hosts'] and item.state == 'file'
      become: yes
      ansible.builtin.copy:
        src: '{{ item.src }}'
        dest: /etc/iscsi/nodes/{{ item.path }}
        owner: root
        group: root
        mode: u=rw,g=,o=
      with_community.general.filetree: files/etc/iscsi/nodes/
      notify:
        - restart iscsi service

  handlers:
    - name: Restarting multipathd
      become: yes
      ansible.builtin.service:
        name: multipathd
        enabled: yes
        state: restarted
      listen: restart multipath service

    - name: Restarting iscsi service
      become: yes
      ansible.builtin.service:
        name: iscsi
        enabled: yes
        state: restarted
      notify: restart multipath service
      listen: restart iscsi service


```


### Expected Results

Expecting to see list of tags in square braces
```
ansible-playbook -i inventory.yaml test.yaml --list-tags

playbook: test.yaml

  play #1 (all): all    TAGS: ["never", "raidix_host"]
      TASK TAGS: ["never", "raidix_host"]
```

### Actual Results

```console
$ ansible-playbook -i inventory.yaml test.yaml --list-tags

playbook: test.yaml

  play #1 (all): all    TAGS: []
      TASK TAGS: []
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
if not playbook_collection:
                
                b_playbook_dir = os.path.dirname(os.path.abspath(to_bytes(playbook, errors='surrogate_or_strict')))
                add_all_plugin_dirs(b_playbook_dir)
                b_playbook_dirs.append(b_playbook_dir)
        if b_playbook_dirs:
            
            
            AnsibleCollectionConfig.playbook_paths = b_playbook_dirs
        
        if not (context.CLIARGS['listhosts'] or context.CLIARGS['listtasks'] or
                context.CLIARGS['listtags'] or context.CLIARGS['syntax']):
            (sshpass, becomepass) = self.ask_passwords()
            passwords = {'conn_pass': sshpass, 'become_pass': becomepass}
        
        loader, inventory, variable_manager = self._play_prereqs()
        
        
        
        
        #
        
        CLI.get_host_list(inventory, context.CLIARGS['subset'])
        
        if context.CLIARGS['flush_cache']:
            self._flush_cache(inventory, variable_manager)
        
        pbex = PlaybookExecutor(playbooks=context.CLIARGS['args'], inventory=inventory,
                                variable_manager=variable_manager, loader=loader,
                                passwords=passwords)