text: Title: Comparison between AnyUrl objects is not working
  Body: ### Initial Checks
  
  - [X] I confirm that I'm using Pydantic V2
  
  ### Description
  
  It's no longer possible to sort AnyUrl objects. This worked in 2.9, like so for example:
  
  ```
   + annotated-types==0.7.0
   + pydantic==2.9.0
   + pydantic-core==2.23.2
   + typing-extensions==4.12.2
   + tzdata==2024.2
  ```
  
  ### Example Code
  
  ```Python
  from pydantic import AnyUrl
  
  first_url = AnyUrl("https://a.com")
  second_url = AnyUrl("https://b.com")
  
  try:
      sorted([second_url, first_url])
  except TypeError as e:
      print(f"sorting failed: {e}")
  ```
  
  
  ### Python, Pydantic & OS Version
  
  ```Text
               pydantic version: 2.10.3
          pydantic-core version: 2.27.1
            pydantic-core build: profile=release pgo=false
                   install path: /Users/arthur/<project>/.venv/lib/python3.12/site-packages/pydantic
                 python version: 3.12.7 (main, Oct  7 2024, 23:45:10) [Clang 18.1.8 ]
                       platform: macOS-14.7.1-arm64-arm-64bit
               related packages: pydantic-settings-2.6.1 typing_extensions-4.12.2
                         commit: unknown
  ```
  