Freeze the composition boundary
Keep a copy of the current layer and note where it intersects the door frame. Unlink the two thumbnails in Photoshop.
Move the intended component
Select the image thumbnail and adjust its position. Recheck covered edges and relink when later moves should affect both.
Example
A face can shift slightly behind the existing doorway opening while the edge that occludes it stays attached to the scene.
Pass condition
The person moves to the intended placement and the original opening still blocks the same image area.