Put Your Good Where it Can Be Received Well
People are going to allow you to be as good or as bad to them as they believe they deserve. If you're mean to them and they believe they deserve better than that, they will lose interest in you. If you are very good to them and they don't believe they deserve it, they will at first appreciate it but then guilt will kick in and they will block receiving by subconsciously looking for something wrong with you. They'll either downplay the good you do, accuse you of ulterior motives, ignore you, or sabotage it in some other strange way.
This has nothing to do with you, it is their subconscious mind attempting to make sense of what's happening in their conscious life.
There's nothing you can do to change this, it's totally up to them. In their reality, they don't deserve you and you leave, so they will act out worse and worse until you've finally had enough and leave. Then they will believe themselves to be a distraught victim...Meanwhile, it was you who was so kind and hopeful and was hurt over and over.
This seems so complicated and rationally makes no sense, but you've got to believe people when they tell you they must be lucky to have you, they don't deserve you, and that one day you'll get sick of them and leave. Those aren't compliments, they're truths.
If a person is secure, ready to receive and give goodness, and believes they deserve good things down to the subconscious level, they may say they're lucky to have met you but they know that from there it's up to them to treat you well and give you no reason to leave and plenty to stay.