The original surface may not be correct.
Can you please post the file.
The above file is not correct
You are getting the corner with a different shape because of two different surface orientation.
You can use other surface tools to clean the model.
Use "delete face" command and enable "delete and patch" to make the corner
See the picture below
Either repeat or use other commands to clean the other areas
Hope this works
The replace face command works well for this particular area - just make a zero offset copy of the lower horizontal edge and then use it to replace the mismatched face area.