Corporations are not literally people in a legal sense. Corporations have some of the same rights as people in certain legal transactions because treating them as entities rather than each individual within a corporation separately is more convenient, and because to do otherwise would in some cases infringe upon the rights of the individual humans who make up the corporation (for example, corporations have a right to free speech because the individuals within that corporation have a right to free speech, and it would be impossible to deny free speech to corporations without also denying it to individuals.)
But systems of law are still capable of recognizing the distinction between the personhood of corporations and of people, just as they can recognize the difference between humans and AI even if AIs can be demonstrated to "learn" the way humans do. As always, context and nuance matter. Laws aren't written or decided upon based on pure logic or calculus but on what human beings want and consider to be in their self-interest.
But systems of law are still capable of recognizing the distinction between the personhood of corporations and of people, just as they can recognize the difference between humans and AI even if AIs can be demonstrated to "learn" the way humans do. As always, context and nuance matter. Laws aren't written or decided upon based on pure logic or calculus but on what human beings want and consider to be in their self-interest.