text: Title: Misplaced Chat Avatar While Thinking
  Body: ### Describe the bug
  
  When the chatbot is thinking, the Avatar icon is misplaced. When it is actually inferencing or done inferencing, the avatar is fine.
  
  Similar to https://github.com/gradio-app/gradio/issues/9655 I believe, but a special edge case. Also, I mostly notice the issue with rectangular images.
  
  ### Have you searched existing issues?  🔎
  
  - [x] I have searched and found no existing issues
  
  ### Reproduction
  
  ```python
  import gradio as gr
  from time import sleep
  AVATAR = "./car.png"
  
  # Define a simple chatbot function
  
  def chatbot_response(message, hist):
      sleep(10)
      return f"Gradio is pretty cool!"
  
  # Create a chat interface using gr.ChatInterface
  chatbot = gr.ChatInterface(fn=chatbot_response,
     chatbot=gr.Chatbot(
      label="LLM",
      elem_id="chatbot",
      avatar_images=(
          None,
          AVATAR
          ),
          )   
      )
  
  # Launch the chatbot
  chatbot.launch()
  ```
  
  
  ### Screenshot
  
  
  ![Image](https://github.com/user-attachments/assets/cedf8945-fadf-4b2a-857e-b783cfdf1b1f)
  
  ![Image](https://github.com/user-attachments/assets/78dc971a-df22-451e-96f6-5dc5664e9259)
  ![Image](https://github.com/user-attachments/assets/b6366a85-b693-4b82-9d6f-bd0b83ab52ab)
  
  ### Logs
  
  ```shell
  
  ```
  
  ### System Info
  
  ```shell
  (base) carter.yancey@Yancy-XPS:~$ gradio environment
  Gradio Environment Information:
  ------------------------------
  Operating System: Linux
  gradio version: 5.13.1
  gradio_client version: 1.6.0
  
  ------------------------------------------------
  gradio dependencies in your environment:
  
  aiofiles: 23.2.1
  anyio: 3.7.1
  audioop-lts is not installed.
  fastapi: 0.115.7
  ffmpy: 0.3.2
  gradio-client==1.6.0 is not installed.
  httpx: 0.25.1
  huggingface-hub: 0.27.1
  jinja2: 3.1.2
  markupsafe: 2.1.3
  numpy: 1.26.2
  orjson: 3.9.10
  packaging: 23.2
  pandas: 1.5.3
  pillow: 10.0.0
  pydantic: 2.5.1
  pydub: 0.25.1
  python-multipart: 0.0.20
  pyyaml: 6.0.1
  ruff: 0.2.2
  safehttpx: 0.1.6
  semantic-version: 2.10.0
  starlette: 0.45.3
  tomlkit: 0.12.0
  typer: 0.15.1
  typing-extensions: 4.8.0
  urllib3: 2.3.0
  uvicorn: 0.24.0.post1
  authlib; extra == 'oauth' is not installed.
  itsdangerous; extra == 'oauth' is not installed.
  
  
  gradio_client dependencies in your environment:
  
  fsspec: 2023.10.0
  httpx: 0.25.1
  huggingface-hub: 0.27.1
  packaging: 23.2
  typing-extensions: 4.8.0
  websockets: 11.0.3
  ```
  
  ### Severity
  
  I can work around it