The matching rule you describe in your question ("We must put the same word after the linking verb that we would put before the linking verb") is correct, as far as it goes, and for a certain definition of "correct". It is the usage that was traditionally prescribed; the justification is that a linking verb like "to be" does not take a direct object (like the verb "to see") but takes what is called a predicative complement that describes the subject. As you see in your examples, some people still apply this rule in current usage.
(I say "as far as it goes" because the matching rule doesn't, for example, provide clear guidance about which form to use when the subject is in the genitive case, as in "my being ???" (we can't say *"my being his") or when there isn't any explicit subject, as in "to be ?? is punishment enough". I asked a question about these situations on ELU: “Being [he/him] is not easy.” Which is prescriptively “correct”?)
The thing is, most English speakers don't speak in a way that conforms to the matching rule.
In general, in ordinary modern speech, linking verbs like "to be" are always followed by the objective form of a personal pronoun.
I specified "personal pronoun" for a reason. This does not apply to the interrogative or relative pronoun "who/whom". The special objective form "whom" is not normally used at all in ordinary modern speech; instead "who" is used as a subjective and objective pronoun. So the traditionally prescribed form "Who am I" remains indisputably correct, and "Whom am I" is pretty indisputably wrong.
When a personal pronoun comes directly before the relative pronoun "who", many speakers tend to keep the personal pronoun in the subjective case. It's a bit unclear why, so I'll just give an example: "It is I who [did X]" is apparently more common than "It is me who [did X]". Information taken from Barrie England's answer on ELU, which itself has as the source the ‘Longman Grammar of Spoken and Written English’.