Hat is the finite verb in your example sentence. Thus, it can appear at only three possible positions: first, second or last. Last position would imply a subordinate clause which in turn would require a corresponding conjunction which is not present. (And there is no hat suggested at the end of the sentence.) And first-position finite verbs are only possible if they are imperatives, questions (not the case) or unmarked conditional clauses (also not). This means that hat must be in second position.
The second hat is therefore only possible if trotzdem were a conjunction that occupies zeroth position. But that cannot be the case here because it is not connecting two main clauses: it is merely the first word of a main clause.
Because trotzdem is not a conjunction it occupies the first position, hat must follow immediately (we are obviously in a main clause) and placing it after the subject is not an option.