how to create cloth for animation?
You can use 3 different ways:

1 - Hide the underlying body and pants vertices with a vertex group assigned to a mask modifier

2 - create a shape key with a driver so that when the bones bend in such an extreme pose the shirt gets bigger and doesn't cross the body anymore

3 - Weight paint the body and the shirt exactly in the same way (if the topology lets you do this)