Being a good person doesn't mean you have to stay in a situation where you're abused, unappreciated, taken for granted, or mistreated.
You deserve better and to be happy, so you have the right to leave! You can walk away and still be a good person by caring for 'em from a distance.