l'll explain.
in REI Rika WAS hit by the truck, but just lightly, the driver hit the breaks instantly, he wasn't going that fast because it was a big curve,
rika was sleeping for a while in the hospital, and she was made by Hanyuu to dream about a world where none of the earlier events happened to determine if Rika needs her now.
Rika was supposed to make a choice, she could have stayed in the "normal" world without sin, but at a price, Keichi wouldn'y come, but Satoko's brother would stay, a few other things happen, and the Dam was built, so everyone was disapearing due moving out, this price even to me was great, not to mention to Rika who was very attatched to her friends this was a real hit,
however she chose to go back to her real world at any cost, and for her this cost was very high, she saw her mother after such a long time it was a pain for her to do this, after she woke up Rena made a small trick to show her if she chose properly, with the candy in one hand and 2 candies in the other hand, Rika chose the single candy hand and said shes glad she chose this hand, and Rena asked her is that right ?
showing the other hand with 2 candies, and explained that 2 candies sometimed is too much, the 2 candies world represented the better world, and the one candy is their world, afterwards, Hanyuu and Rika have a chat where Rika says that she has to move on without Hanyuu from now on, and they seperate ways, Hanyuu goes to rest.
as for After Kai series where Hanyuu becomes a spirit again, she was temporarily human to make sure they win, she was the last piece to defeat Fate, after Miyo was defeated she disapears into her spirit form, there is a small scene where l think Mion asks where is Hanyuu and rika says she returned or something like that, that scene is 7 seconds long.
l hope l answered your question.