BUG: Fix RecursionError when apply native container types as a func
- [x] closes #61565
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
  - Nothing new added.
- [x] Added an entry in the latest `doc/source/whatsnew/v3.0.0.rst` file if fixing a bug or adding a new feature.

## Description
Fixes a bug in `DataFrame.apply` raising `RecursionError` when passing `func=list[int]`.

## Cause
The existing code handled parameterized container types, but not native container types, yielding false positives. I also added a check for `types.GenericAlias` to handle native container types.

#### Reference: https://github.com/python/cpython/blob/3.12/Lib/typing.py#L1251
> ```py
> class _GenericAlias(_BaseGenericAlias, _root=True):
>     ...
>     # Objects which are instances of this class include:
>     # * Parameterized container types, e.g. `Tuple[int]`, `List[int]`.
>     #  * Note that native container types, e.g. `tuple`, `list`, use
>     #    `types.GenericAlias` instead.
> ```
Thanks @heoh 