I exported avi with RGB and alpha after removing green screen in after effects, and I put the media player that is linked with the avi video to plane, then I rendered using media render queue, and exported as exr. But the render doesn’t export high quality image. I can see the weird line around the person. (I used media player and plane for compositing) I attached the captured photo.

This is expected depending on how the video clip is keyed. There is an option to remove green screens from Unreal Engine on Images.

I am not aware if that is possible for video clips, so perhaps view if there is an option. Also make sure the clip isn’t compress in the editor, which could result in something like this.
I already removed the green screen with After Effects, so I don’t need the Chrome key setting in the Unreal engine. I compared the 2 videos and made a video. The upper video of the woman is exported from Unreal engine as exr, and the lower is from after effects (just removed green screen). There are pixel line on upper woman. Also it is not high quality like the lower video (from after effects)

I uploaded video so you can see the difference clearly