These stories use science fiction to explore the human condition. There are likely hundreds of such tales.
Off the top of my head: TOS episode 1-7 - roboKirk, real Kirk, and a fembot (it’s complicated) TOS episode 2-2 - an immortal alien falls for a Star Fleet officer TOS episode 2-9 - an energy being falls for Zefram Cochrane TOS episode 3-19 - Kirk falls for a fembot Blade Runner (1982) - A cop falls for a replicant Her (2013) - a lonely writer falls for an AI via cell phone
Rain, an orphaned colonist on a brutally dystopic Weyland-Yutani mining colony, considers Andy her adopted brother. Andy is an android (“I prefer the term artificial person”) – previously discarded, then reprogrammed by Rain’s father to look out for her.
Andy turns out to be the key to Rain and a group of friends escaping from their miserable world—but androids are not allowed at their destination.
The story involves Rain’s reciprocal devotion to Andy versus her knowlege that he is an android, how he is treated as disposable by some of the other humans, and how far Rain’s feelings extend when her survival is at stake.