BUG: pd.to_datetime(infer_datetime_format=True) drops timezone
- [x] closes #41047
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry

In this PR, I try to fix issue #41047.
I would appreciate it if you could review this PR.

## About the issue
In the UTC format, "Z" is used as a special timezone "+00:00".
But current `pd.to_datetime` function can not recognize the last "Z" when the `infer_datetime_format` is `True`.
Note that `pd.to_datetime` can properly interpret "Z" as "+00:00" when the `infer_datetime_format` is unspecified.

The problem happens in the following codes of datetimes.py:

```py
    if infer_datetime_format and format is None:
        format = _guess_datetime_format_for_array(arg, dayfirst=dayfirst)

    if format is not None:
        # There is a special fast-path for iso8601 formatted
        # datetime strings, so in those cases don't use the inferred
        # format because this path makes process slower in this
        # special case
        format_is_iso8601 = format_is_iso(format)
        if format_is_iso8601:
            require_iso8601 = not infer_datetime_format
            format = None

    if format is not None:
        res = _to_datetime_with_format(
            arg, orig_arg, name, tz, format, exact, errors, infer_datetime_format
        )
        if res is not None:
            return res

```

Here, the `_guess_datetime_format_for_array` returns a format string like '%Y-%m-%d %H:%M:%SZ' depending on the input strings.
The resulting format is estimated by `format_is_iso` function. 
This result is used to judge whether the function specialized for iso format is used or not.
But current `format_is_iso` can not recognize the last "Z" in a format string, so it returns `False` if the format has "Z" regardless the format is valid iso8601 format or not.
Because of this misjudgment, the wrong function (`_to_datetime_with_format`) is used for the iso string, and the timestamp that does not have timezone information is returned.

## About the fix

I fixed the format_is_iso function to recognize the last "Z" in the format string to solve this problem.