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

"""Will be called when an external kill command is received."""
    def heartbeat_callback(self, session=None):
        """Callback that is called during heartbeat. This method should be overwritten."""
    def heartbeat(self, only_if_necessary: bool = False):
        """
        Heartbeats update the job's entry in the database with a timestamp
        for the latest_heartbeat and allows for the job to be killed
        externally. This allows at the system level to monitor what is
        actually active.
        For instance, an old heartbeat for SchedulerJob would mean something
        is wrong.
        This also allows for any job to be killed externally, regardless
        of who is running it or on which machine it is running.
        Note that if your heart rate is set to 60 seconds and you call this
        method after 10 seconds of processing since the last heartbeat, it
        will sleep 50 seconds to complete the 60 seconds and keep a steady
        heart rate. If you go over 60 seconds before calling it, it won't
        sleep at all.
        :param only_if_necessary: If the heartbeat is not yet due then do
            nothing (don't update column, don't call ``heartbeat_callback``)
        """
        seconds_remaining = 0
        if self.latest_heartbeat:
            seconds_remaining = self.heartrate - (timezone.utcnow() - self.latest_heartbeat).total_seconds()
        if seconds_remaining > 0 and only_if_necessary:
            return
        previous_heartbeat = self.latest_heartbeat
        try: