The picture on the left is a portrait video stored as landscape but with a rotation tag. So, the overlay image co-ordinates take effect with reference to the stored representation. For such cases, you should rotate the video beforehand by 1) adding the transpose filter before the overlay 2) disabling autorotate on the input video* and 3) manually resetting the rotation tag in the output, e.g.
ffmpeg -noautorotate -i input.mp4 -i arrow.png -filter_complex "[0]transpose=1[bg];[bg][1]overlay=X:Y" -metadata:s:v rotate=0 out.mp4
*not needed if your ffmpeg is from April 2015 or earlier.
To check the rotation tag for a video, you can run
ffprobe input.mp4 -show_entries stream_tags=rotate -v 0 -of compact=p=0:nk=1
You'll get an angle value. If it's 90, use transpose=1
. If it's 270, use transpose=2