import typing
type(typing.cast(int, '11'))

still returns <class 'str'> instead of int. Then, what does typing.cast do here?

From the documentation (emphasis mine):

Cast a value to a type.

This returns the value unchanged. To the type checker this signals that the return value has the designated type, but at runtime we intentionally don’t check anything (we want this to be as fast as possible).

The “casting” only takes place in the type-checking system, not at runtime.