For the most part it just feels like suspension of disbelief. You, as the player, (not the dev) accept the general narrative as fantasy and escapist and position 2 (tropes to build up the tension in the game like peeping, or a maguffin device/spell). But sometimes it can get a little weird. Ironically when something does crop up in a game that feels particularly rapey (in games utilising those basic features) it can get rather uncomfortable. Two that spring to mind. In waifu academy, (and to be clear, im not casting a moral pronouncement just using it as an illustrative example) a game almost built on the concept of revenge rape and abuse, (but isnt really) theres a scene where you literally rape a conscious girl telling you to stop in the lockers (as you spy on her mum having sex). As a player you might start feeling a bit... uncomfortable, but dont worry because she doesnt mind after the event. Later on she gets to rape you and now its even.
Im sure its not the only game where the fair and equal trade of rape makes it alright. Rape as something with consequence or emotional devastation doesnt exist. Its not even couched as rape, or if it is, its a world in which rape is just some kind of transaction. I rape you, you rape me. Fancy a bit of raping this afternoon Doris? 'Well i do need to do my weekly shop, but i could probably fit some rape in after lunch'. As a player you're kind of just left going 'oh... er, okay. I guess its fine in this universe.' and carry on playing.
Then there's this other game, i forget the name. Its a corruption game. You gain a magic power and can slowly break the persons will and inhibitions down until they become your slave. Again, rape is really front and center so im not casting more aspersions here, its just an interesting example. Ironically its not the raping that makes this one noteable. Its one specific scene where one of the girls is fighting your mind control over her. She stays at home and avoids coming into the office you work at entirely to avoid you. The protagonist cant have that. So he finds out where she lives, and knocks on her door. She is stunned and terrified to see you. She locks the door. But you then break into her house to find her in her room sobbing. She desperately wants you to leave her alone. But again, you dont. And its really uncomfortable because its the first time you're pulled out of the fantasy. Of course, you manage to brainwash her again and things go back to normal.
I dont know if its intentional or not, but its the first time you as a player are really made to look in the mirror. Sure, you can whittle down their self control, thats just the driving mechanic of the game. Perhaps even you as a player are giving them exactly what they need to become the person they deep down want to be with your magic power (and overall thats the driving narrative), but in this one instance the narrative walls come tumbling down and now its actually foregrounded as mind control and rape. And for reasons i dont understand i didnt expect actual rape in my cute little rapey harem game. To this day i still dont know if it was intentional from the author to make you reflect a little, or whether it was just the obvious solution to drive the story forward and give a bit of conflict.
The point is that the use of rape is always couched in that suspension of disbelief. You accept the voyeurism, corruption and rape elements. But thats just beating the game. But once in a while you're going to find an actual rape scene and its going to confuse you because youre not expecting or even wanting rape with consequences (in real world) in your game. Unless of course you are in which case you probably want games that dont just say 'dont worry, none of this matters; you're fine, s/he's fine' (as in the waifu academy example above).