I think you’re assuming the hinge is on the other side (it’s visible at the bottom of the photo). It’s the top edge of the door making the indent in the plaster as far as I can tell.
Same logic though. Trim the top of the door off and build the top of the frame down to meet the door.
Snipe the corner off the door & build out the frame to fill the gap, then patch the plaster.