Schnorr's protocol is an interactive proof of knowledge. The 'attack' that you provide does not contradict this: if the powerful prover that you describes can indeed try all $r$ such that $h^r = t\cdot z^c$, then she can as well try all $x$ and check for $z=h^x$. Put otherwise, this prover does indeed know the discrete logarithm of $z$: in fact, any 'unbounded' prover knows the discrete log of $z$.
The proof that a prover that provides an accepting proof must know the discrete logarithm is done by using rewinding, and showing that a simulator could extract this discrete log from its interaction is quite straightforward (repeat the last two flows twice, write out the equations, cancel the randomness introduced in the first flow, and you get the witness); furthermore, if you write it, you'll observe that it does not rely on any computational assumption - if the verification succeeds with non negligible probability, extraction will succeed as well, with comparable probability. This holds independently of the computational power of the prover.
EDIT: to answer your follow up question, yes, you got the intuition right: if the prover can produce two accepting transcripts, she must know $x$, as $x$ can be extracted from these transcripts. Your issue seems to be that a computationally unbounded prover can always compute $x$, hence he always 'knows' $x$ - so, how is that interesting to consider also unbounded provers in the security analysis?
The answer lies in the formal guarantee given by a proof of knowledge. While the intuition is that it guarantees that the prover 'knows' the witness, the actual guarantee is the following: if the prover produces an accepting transcript, then a simulator can (using rewinding) extract the witness. This is of crucial importance in many cryptographic protocols where the proof of knowledge is part of a larger system: the simulator will often need to extract the witness from the proof, to use it when simulating other parts of the protocol. Now, in an argument, which is only secure against computationally bounded provers, an unbounded prover could well produce an accepting transcript from which the simulator cannot extract a witness - by breaking the computational assumption on which the knowledge soundness relies. Hence, even though this unbounded prover does indeed know a witness (she is unbounded, so she can obtain all witnesses via brute force), she does not necessarily allow the simulator to extract it from successful transcript, hence the analysis of ant larger system in which the simulator would need this witness would break down.
In Schnorr's protocol, however, as the soundness is unconditional, the simulator is guaranteed to always succeed in extracting the witness from the prover, even if she is unbounded.