test: add regression test for UnionMode runtime access
Add test that verifies UnionMode is available at runtime for Pydantic
model_rebuild(). This test runs in a subprocess to ensure a clean namespace
without pytest's import side effects, properly detecting when UnionMode
is incorrectly placed inside TYPE_CHECKING block.