How does thrust relate to horsepower on turbocharged engines?
Assuming you are talking about a turbocharged propeller driven aircraft, your question
really makes it easy to explain as you have already identified the two parts of your power unit
that are affected by increasing altitude (thinner air).  The amount of air it can breath and the amount of thrust your prop can generate.

The turbo only takes care of the air breathing part, yes, it has as much power as at sea level
because to turbocharger can compress enough of the thin air to feed it. No problem there.

But the prop is still spinning thinner air, so it can not get the same "bite" as at lower altitudes
with out going to even higher RPMs.  So, when your RPMs max out due to engine limitations,
or even the tips going supersonic, that's it, no more thrust increase available.