Self solved:
Instead of accessing __annotations__, use typing.get_type_hints() on the class. Not instance.
from typing import get_type_hints
# CORRECT
get_type_hints(B) # {'a': T, 'b': P}
# All these below are WRONG
get_type_hints(B()) # {'b': P}
B.__annotations__ # {'b': P}
B().__annotations__ # {'b': P}