The solution of the apparent contradiction may be in the scales of time:
At any point in time, you can either slim down (catabolic, during excercise) or build muscle (anabolic, during rest after excercise), but
on a more coarse time scale where excercise and rest phases are "at the same time" both can happen "together".
See e.g. the ...