text: Title: PydanticOmit failing with duplicated union field
  Body: ### Initial Checks
  
  - [x] I confirm that I'm using Pydantic V2
  
  ### Description
  
  When using a custom type that omits its JSON schema (by raising `PydanticOmit` in its `__get_pydantic_json_schema__` method), the schema generation behaves inconsistently. In a model with a single field of a union type, the JSON schema is generated successfully (omitting the custom type as intended). However, when the same custom type is used in multiple fields within one model, generating the JSON schema fails with a `PydanticOmit` exception.
  
  ### Example Code
  
  ```Python
  from pydantic_core import PydanticOmit
  from pydantic import BaseModel
  
  class CustomSerializedType(BaseModel):
      @classmethod
      def __get_pydantic_json_schema__(
          cls, core_schema, handler,
      ):
          raise PydanticOmit
  
  class SingleField(BaseModel):
      first_field: list[float | CustomSerializedType]
  
  class DuplicatedField(BaseModel):
      first_field: list[float | CustomSerializedType]
      second_field: list[float | CustomSerializedType]
  
  # This is fine
  SingleField.model_json_schema()
  """
  {'properties': {'first_field': {'items': {'type': 'number'},
     'title': 'First Field',
     'type': 'array'}},
   'required': ['first_field'],
   'title': 'SingleField',
   'type': 'object'}
  """
  
  # This raises an error
  DuplicatedField.model_json_schema()
  """
  ...
  handler_func(schema_or_field, current_handler, js_modify_function)
      535 def new_handler_func(
      536     schema_or_field: CoreSchemaOrField,
      537     current_handler: GetJsonSchemaHandler = current_handler,
      538     js_modify_function: GetJsonSchemaFunction = js_modify_function,
      539 ) -> JsonSchemaValue:
  --> 540     json_schema = js_modify_function(schema_or_field, current_handler)
      541     if _core_utils.is_core_schema(schema_or_field):
      542         json_schema = populate_defs(schema_or_field, json_schema)
  
  Cell In[20], line 9, in CustomSerializedType.__get_pydantic_json_schema__(cls, core_schema, handler)
        5 @classmethod
        6 def __get_pydantic_json_schema__(
        7     cls, core_schema, handler,
        8 ) -> JsonSchemaValue:
  ----> 9     raise PydanticOmit
  
  PydanticOmit: PydanticOmit()
  """
  ```
  
  ### Python, Pydantic & OS Version
  
  ```Text
  pydantic version: 2.10.6
          pydantic-core version: 2.27.2
            pydantic-core build: profile=release pgo=false
                   install path: .venv/lib/python3.12/site-packages/pydantic
                 python version: 3.12.7 (main, Oct 16 2024, 07:12:08) [Clang 18.1.8 ]
                       platform: macOS-15.2-arm64-arm-64bit
               related packages: fastapi-0.115.6 mypy-1.15.0 pydantic-settings-2.6.1 typing_extensions-4.12.2
                         commit: unknown
  ```