### Apache Airflow version

main (development)

### What happened

Steps to reproduce:
1. run 2 replicas of scheduler
2. initiate shut down of one of the schedulers
3. In Airflow UI observe message
<img width="1162" alt="image" src="https://user-images.githubusercontent.com/1017130/205650336-fb1d8e39-2213-4aec-8530-abd1417db426.png">

3rd step should be done immediately after 2nd (refreshing UI page few times). 2nd and 3rd steps might be repeated for couple of times in order to reproduce.


### What you think should happen instead

Warning message shouldn't be displayed.

The issue is that for this warning message recent (with latest heartbet) scheduler job is fetched
https://github.com/apache/airflow/blob/f02a7e9a8292909b369daae6d573f58deed04440/airflow/jobs/base_job.py#L133.

And this may point to job which is not running (state!="running") and that is why we see warning message.
The warning message in this case is misleading as another replica of scheduler is running in parallel.

### How to reproduce

_No response_

### Operating System

Linux

### Versions of Apache Airflow Providers

_No response_

### Deployment

Composer

### Deployment details

_No response_

### Anything else

_No response_

### Are you willing to submit PR?

- [X] 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)

state = Column(String(20))
    job_type = Column(String(30))
    start_date = Column(UtcDateTime())
    end_date = Column(UtcDateTime())
    latest_heartbeat = Column(UtcDateTime())
    executor_class = Column(String(500))
    hostname = Column(String(500))
    unixname = Column(String(1000))
    __mapper_args__ = {"polymorphic_on": job_type, "polymorphic_identity": "BaseJob"}
    __table_args__ = (
        Index("job_type_heart", job_type, latest_heartbeat),
        Index("idx_job_state_heartbeat", state, latest_heartbeat),
        Index("idx_job_dag_id", dag_id),
    )
    task_instances_enqueued = relationship(
        "TaskInstance",
        primaryjoin="BaseJob.id == foreign(TaskInstance.queued_by_job_id)",
        backref=backref("queued_by_job", uselist=False),
    )
    dag_runs = relationship(
        "DagRun",
        primaryjoin=lambda: BaseJob.id == foreign(_resolve_dagrun_model().creating_job_id),
        backref="creating_job",
    )
    """
    TaskInstances which have been enqueued by this Job.
    Only makes sense for SchedulerJob and BackfillJob instances.
    """
    heartrate = conf.getfloat("scheduler", "JOB_HEARTBEAT_SEC")
    def __init__(self, executor=None, heartrate=None, *args, **kwargs):