Currently we use execution-date when generating the command to send via executor in https://github.com/apache/airflow/blob/9c94b72d440b18a9e42123d20d48b951712038f9/airflow/models/taskinstance.py#L420-L436

We should replace the execution_date in their to run_id instead and handle the corresponding changes needs on the executor and worker.
tests/jobs/test_local_task_job.py
@pytest.mark.parametrize("return_codes", [[0], 9 * [None] + [0]])  
    @mock.patch("airflow.jobs.local_task_job.get_task_runner")
    def test_number_of_queries_single_loop(self, mock_get_task_runner, return_codes, dag_maker):
        unique_prefix = str(uuid.uuid4())
        with dag_maker(dag_id=f'{unique_prefix}_test_number_of_queries'):
            task = DummyOperator(task_id='test_state_succeeded1')
        dag_maker.create_dagrun(run_id=unique_prefix, state=State.NONE)
        ti = TaskInstance(task=task, execution_date=DEFAULT_DATE)
        mock_get_task_runner.return_value.return_code.side_effects = return_codes
        job = LocalTaskJob(task_instance=ti, executor=MockExecutor())
        with assert_queries_count(18):
            job.run()