dnd 5e – Does moving behind full cover count as “leaving the opponent’s reach” for purposes of Attack of Opportunity?

Yes, he gets an OA

You are moving to get away from him, and for sure “being on the other side of the wall” means you are “out of his reach” as most attackers cannot reach through a wall.

The OA doesn’t care where you are moving to, the OA condition is set based upon where you are moving from. (Without using the Disengage action).

You can make an opportunity attack when a hostile creature that you
can see moves out of your reach.(PHB p. 195)

It further points out that the attack “interrupts the provoking creature’s movement,” so that you may not get to that bit of cover depending upon the result of the OA. For example, your attempt to get through that door may fail if the attack knocks you out as a result of the OA.

Whether or not the enemy can see you before the attempted move is complete (when the move is begun) determines the “that you can see criterion” not “after the move is completed.”(Which is the “behind the wall” condition).

If you want to avoid the OA, use the Disengage action.

Insofar as the incorporeal creature is concerned, that is a separate question.