Ugh this point is so old. Corporations have “legal personhood”, which shares almost nothing in common with actually being a person in the understood sense. It’s just a legal term, in the same way a state of matter and a state in the US have nothing in common except the same letters make up the term.
Since the only sense that “person” matters to ad hominem really is as an entity making an argument, a corporation (or any other collective entity, with or without juridical personhood) is a person in the sense required for the fallacy to apply.
(Also, juridical persons and natural persons are a lot more similar than US states and states of matter; it is not just a distantly related etymology; the former literally refers to having legal attributes of the latter.)
https://en.wikipedia.org/wiki/Corporate_personhood