There is a loop hole in the ending
The whole movie we were taught that when the musical piece is played slow the pianist will travel to the same day 20 years later, and when played fast travel to the same day 20 years back. The length of time is not optional to the pianist
(first of all, why did Rain time travel back at all if she likes Ye so much?)
Now we have to be clear that Rain dies when she writes her note on the table. This is the only logical explanation for Rain's mom acting weird throughout the movie. Ever since Rain dies her mom is in grief and cannot accept the death of her daughter, hence acting delusional.
When Ye plays the musical piece for the last time when the piano room was being demolished, he would have been too late to save Rain because he would travel to the same day 20 years ago which Rain has already suffered from her asthma attack.
He would have never seen Rain. That would be the real (and sad) ending.