<!--

Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
Don't worry if they're not all applicable; just try to include what you can :-)

If you need to include code snippets or logs, please put them in fenced code
blocks.  If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>

Please delete these comment blocks before submitting the issue.

-->

<!--

IMPORTANT!!!

PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!

PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!

Please complete the next sections or the issue will be closed.
These questions are the first thing we need to know to understand the context.

-->

**Apache Airflow version**: 2.0.0


**What happened**:

Running sync_perm CLI command does not synchronize the permission granted through the DAG via access_control. 

This is because of dag serialization. When dag serialization is enabled, the dagbag will exhibit a lazy loading behaviour. 


**How to reproduce it**:

1. Add access_control to a DAG where the new role has permission to see the DAG.
```
    access_control={
        "test": {'can_dag_read'}
    },
```

4. Run `airflow sync-perm`.
5. Log in as the new user and you will still not see any DAG.
6. If you refresh the DAG, the new user will be able to DAG after they refresh their page

**Expected behavior**
When I run `airflow sync-perm`, I expect the role who has been granted read permission for the DAG to be able to see that DAG.

This is also an issue with 1.10.x with DAG Serialization enabled, so would be good to backport it too.


tests/cli/commands/test_sync_perm_command.py
#
#
#
#
import unittest
from unittest import mock
from airflow.cli import cli_parser
from airflow.cli.commands import sync_perm_command
from airflow.models.dag import DAG
from airflow.models.dagbag import DagBag
from airflow.security import permissions
class TestCliSyncPerm(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.dagbag = DagBag(include_examples=True)
        cls.parser = cli_parser.get_parser()
    @mock.patch("airflow.cli.commands.sync_perm_command.cached_app")
    @mock.patch("airflow.cli.commands.sync_perm_command.DagBag")
    def test_cli_sync_perm(self, dagbag_mock, mock_cached_app):