### 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)

DagModel.dag_id.ilike("%" + escaped_arg_search_query + "%", escape="\\")
                    | DagModel.owners.ilike("%" + escaped_arg_search_query + "%", escape="\\")
                )
            if arg_tags_filter:
                dags_query = dags_query.filter(DagModel.tags.any(DagTag.name.in_(arg_tags_filter)))
            dags_query = dags_query.filter(DagModel.dag_id.in_(filter_dag_ids))
            filtered_dag_count = dags_query.count()
            if filtered_dag_count == 0 and len(arg_tags_filter):
                flash(
                    "No matching DAG tags found.",
                    "warning",
                )
                flask_session[FILTER_TAGS_COOKIE] = None
                return redirect(url_for("Airflow.index"))
            all_dags = dags_query
            active_dags = dags_query.filter(~DagModel.is_paused)
            paused_dags = dags_query.filter(DagModel.is_paused)
            is_paused_count = dict(
                all_dags.with_entities(DagModel.is_paused, func.count(DagModel.dag_id))
                .group_by(DagModel.is_paused)
                .all()
            )
            status_count_active = is_paused_count.get(False, 0)
            status_count_paused = is_paused_count.get(True, 0)
            all_dags_count = status_count_active + status_count_paused
            if arg_status_filter == "active":
                current_dags = active_dags
                num_of_all_dags = status_count_active
            elif arg_status_filter == "paused":
                current_dags = paused_dags