How do I fix small gap at top and on the left of iMac display?
I have the same model with replaced RAM as well. You can try this. Open system preferences and click on display/Scaled. Now set the display to a couple of different resolution values and then return to your desired value. If offset is still apparent, try a different resolution.