### Apache Airflow version

Other Airflow 2 version (please specify below)

### What happened

Hi, I'm currently on Airflow 2.4.2
In /home when sorting by DAG/Owner/Next Run and going to the next page the sort resets.
This feature only works if  I'm looking for last or first, everything in the middle is unreachable.

### What you think should happen instead

The sorting should continue over the pagination

### How to reproduce

Sort by any sortable field on DagList and go to the next page

### Operating System

apache/airflow:2.4.2-python3.10

### Versions of Apache Airflow Providers

_No response_

### Deployment

Official Apache Airflow Helm Chart

### Deployment details

_No response_

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

def check_generate_pages_html(self, current_page, total_pages, window=7, check_middle=False):
        extra_links = 4  
        search = "'>\"/><img src=x onerror=alert(1)>"
        html_str = utils.generate_pages(current_page, total_pages, search=search)
        assert search not in html_str, "The raw search string shouldn't appear in the output"
        assert "search=%27%3E%22%2F%3E%3Cimg+src%3Dx+onerror%3Dalert%281%29%3E" in html_str
        assert callable(html_str.__html__), "Should return something that is HTML-escaping aware"
        dom = BeautifulSoup(html_str, "html.parser")
        assert dom is not None
        ulist = dom.ul
        ulist_items = ulist.find_all("li")
        assert min(window, total_pages) + extra_links == len(ulist_items)
        page_items = ulist_items[2:-2]
        mid = int(len(page_items) / 2)
        for i, item in enumerate(page_items):
            a_node = item.a
            href_link = a_node["href"]
            node_text = a_node.string
            if node_text == str(current_page + 1):
                if check_middle:
                    assert mid == i
                assert "javascript:void(0)" == href_link
                assert "active" in item["class"]
            else:
                assert re.search(r"^\?", href_link), "Link is page-relative"
                query = parse_qs(href_link[1:])
                assert query["page"] == [str(int(node_text) - 1)]
                assert query["search"] == [search]
    def test_generate_pager_current_start(self):