text: Title: Missing dependencies between tasks if Airflow Task Group is empty
  Body: ### Apache Airflow version
  
  2.10.5
  
  ### If "Other Airflow 2 version" selected, which one?
  
  _No response_
  
  ### What happened?
  
  Airflow is not honouring the task dependecies for a task if the parent is empty task group
  
  ### What you think should happen instead?
  
  If the parent of a task is empty task group
  Then it should follow the dependency rule of the parent's parent.
  
  
  ### How to reproduce
  
  Define a dag with 5 tasks 
  A B C D E
  
  C D belongs to task group test
  
  Dependencies between tasks is
   
  A >> B >> test >> E
  C >> D
  
  If task group test is not empty, everything is running fine
  
  If task group test is empty
  
  Ideally behaviour should be A >> B>> E
  
  But tasks A, E are running parallely without honouring the dependencies 
  
  Graph view is showing the dependencies correctly but execution is being different
  
  
  
  
  ### Operating System
  
  Linux
  
  ### Versions of Apache Airflow Providers
  
  _No response_
  
  ### Deployment
  
  Other
  
  ### 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)
  