text: Title: Bug: SerializationException when running modeling-and-features demo from docs
  Body: ### Description
  
  Hi,
  
  First of all thanks for developing Litestar, it proves to be a very useful piece of software here. Unfortunately I ran into an issue. 
  
  I ran into an `msgspec_error` when requesting a page backed by sqlalchemy models which are connected via relationships. It seems that the database is correctly queried, a list of objects are returned, but then an exception is thrown when converting the objects to JSON.
  
  I ran into this issue on my production code but when isolating an MCVE I noticed that the provided example in the documentation also shows the same unexpected behaviour on tested on two different machines.  One crucial change to the code is however adding an author to the database.
  
  Since this is quite a show-stopper for me: Thanks in advance for having a look at this!
  
  ### URL to code causing the issue
  
  https://docs.litestar.dev/2/tutorials/repository-tutorial/01-modeling-and-features.html
  
  ### MCVE
  
  ```python
  from datetime import date
  from typing import TYPE_CHECKING
  from uuid import UUID
  
  from sqlalchemy import ForeignKey, select
  from sqlalchemy.orm import Mapped, mapped_column, relationship
  
  from litestar import Litestar, get
  from litestar.contrib.sqlalchemy.base import UUIDAuditBase, UUIDBase
  from litestar.contrib.sqlalchemy.plugins import AsyncSessionConfig, SQLAlchemyAsyncConfig, SQLAlchemyInitPlugin
  
  if TYPE_CHECKING:
      from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession
  
  
  # the SQLAlchemy base includes a declarative model for you to use in your models.
  # The `Base` class includes a `UUID` based primary key (`id`)
  class Author(UUIDBase):
      name: Mapped[str]
      dob: Mapped[date]
      books: Mapped[list["Book"]] = relationship(back_populates="author", lazy="selectin")
  
  
  # The `AuditBase` class includes the same UUID` based primary key (`id`) and 2
  # additional columns: `created_at` and `updated_at`. `created_at` is a timestamp of when the
  # record created, and `updated_at` is the last time the record was modified.
  class Book(UUIDAuditBase):
      title: Mapped[str]
      author_id: Mapped[UUID] = mapped_column(ForeignKey("author.id"))
      author: Mapped[Author] = relationship(lazy="joined", innerjoin=True, viewonly=True)
  
  
  session_config = AsyncSessionConfig(expire_on_commit=False)
  sqlalchemy_config = SQLAlchemyAsyncConfig(
      connection_string="sqlite+aiosqlite:///test.sqlite", session_config=session_config
  )  # Create 'async_session' dependency.
  sqlalchemy_plugin = SQLAlchemyInitPlugin(config=sqlalchemy_config)
  
  
  async def on_startup() -> None:
      """Initializes the database."""
      async with sqlalchemy_config.get_engine().begin() as conn:
          await conn.run_sync(UUIDBase.metadata.create_all)
          
      #crucially there needs to be an author in the table for the error to appear
      await conn.execute(Author.__table__.insert().values(name="F. Scott Fitzgerald"))
  
  
  @get(path="/authors")
  async def get_authors(db_session: "AsyncSession", db_engine: "AsyncEngine") -> list[Author]:
      """Interact with SQLAlchemy engine and session."""
      return list(await db_session.scalars(select(Author)))
  
  
  app = Litestar(
      route_handlers=[get_authors],
      on_startup=[on_startup],
      plugins=[SQLAlchemyInitPlugin(config=sqlalchemy_config)],
      debug=True
  )
  ```
  
  
  ### Steps to reproduce
  
  ```bash
  1. Go to the https://docs.litestar.dev/2/tutorials/repository-tutorial/01-modeling-and-features.html page
  2. Download the code
  3. Run the demo with minimal requirements installed and go to http://localhost:8000/authors
  4. See the error
  ```
  
  
  ### Screenshots
  
  _No response_
  
  ### Logs
  
  ```bash
  File "/usr/local/lib/python3.12/site-packages/litestar/serialization/msgspec_hooks.py", line 143, in encode_json
      raise SerializationException(str(msgspec_error)) from msgspec_error
  litestar.exceptions.base_exceptions.SerializationException: Unsupported type: <class '__main__.Author'>
  Traceback (most recent call last):
    File "/usr/local/lib/python3.12/site-packages/litestar/serialization/msgspec_hooks.py", line 141, in encode_json
      return msgspec.json.encode(value, enc_hook=serializer) if serializer else _msgspec_json_encoder.encode(value)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/litestar/serialization/msgspec_hooks.py", line 88, in default_serializer
      raise TypeError(f"Unsupported type: {type(value)!r}")
  TypeError: Unsupported type: <class '__main__.Author'>
   
  The above exception was the direct cause of the following exception:
   
  Traceback (most recent call last):
    File "/usr/local/lib/python3.12/site-packages/litestar/middleware/exceptions/middleware.py", line 219, in __call__
      await self.app(scope, receive, send)
    File "/usr/local/lib/python3.12/site-packages/litestar/routes/http.py", line 82, in handle
      response = await self._get_response_for_request(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/litestar/routes/http.py", line 134, in _get_response_for_request
      return await self._call_handler_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/litestar/routes/http.py", line 158, in _call_handler_function
      response: ASGIApp = await route_handler.to_response(app=scope["app"], data=response_data, request=request)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/litestar/handlers/http_handlers/base.py", line 557, in to_response
      return await response_handler(app=app, data=data, request=request)  # type: ignore[call-arg]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/litestar/handlers/http_handlers/_utils.py", line 79, in handler
      return response.to_asgi_response(app=None, request=request, headers=normalize_headers(headers), cookies=cookies)  # pyright: ignore
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/litestar/response/base.py", line 451, in to_asgi_response
      body=self.render(self.content, media_type, get_serializer(type_encoders)),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/litestar/response/base.py", line 392, in render
      return encode_json(content, enc_hook)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/site-packages/litestar/serialization/msgspec_hooks.py", line 143, in encode_json
      raise SerializationException(str(msgspec_error)) from msgspec_error
  litestar.exceptions.base_exceptions.SerializationException: Unsupported type: <class '__main__.Author'>
  INFO:     127.0.0.1:44906 - "GET /authors HTTP/1.1" 500 Internal Server Error
  ```
  
  
  ### Litestar Version
  
  2.8.2
  
  ### Platform
  
  - [X] Linux
  - [X] Mac
  - [ ] Windows
  - [ ] Other (Please specify in the description above)