After all the constant tugging each and every time the witch and the prince climbed up Rapunzel's long blonde hair, her hair started to fall out in clumps due to Alopecia.
When the Prince saw this, he ran away and never came back to see her again. He never really loved her for the person she was. He suffered from Trichophilia which was the main reason why he was attracted to Rapunzel.
Rapunzel was heart broken, and after looking at her own reflection in the mirror, she came to a final decision and shaved the rest of her hair. The witch was never ever able to climb up Rapunzel's hair anymore, and Rapunzel was left alone without food and water in the tower.
Days before Rapunzel's death she had hallucinations due to the lack of company and water. She dreamt that the Prince came back to save her, and that she still had her long blonde hair. She lost her mind and eventually she died from starvation and dehydration.