Jesus saves us from our sin and sin is the transgression of the Law of God, so there is a direct connection between our salvation and being a doer of the Law of God and the key is to correctly understand what that connection is and is not. I do not like the phrase "saved by works" because it does not bring clarity to what that connection is or is not. If I affirm that we are saved by works, then I am not taking the position that we are required to have first done enough works in order to earn our salvation as the result, but if I deny that we are saved by works, then I am not taking the position that there is no connection our salvation and being a doer of the Law of God.I am glad to see that you do not believe we are saved by works, but rather we are saved unto good works. But I till do not understand the "or else" part of your argument. Is salvation lost when the things that are required of a person who has been saved are not fulfilled (i.e., when he does not choose to break the law or does an ungodly act)?
We do not lose or regain our salvation every time we sin or repent, but whether someone can lose their salvation if they deliberately turn their back on God is another issue. In Titus 2:11-13, the content of our gift of salvation is described as being trained by grace to do what is godly, righteous, and good, and to renounce doing what is ungodly, so if someone is participating in that training in obedience to the Law of God, then they are intrinsically being saved from not participating in that training, but if they then deliberately rejects the content of their gift of salvation by doing what is ungodly and renouncing doing what is godly, righteous, and good, then they are no longer being saved from not participating in that training. Someone who is participating in being trained to experience doing something does not always perfectly do that, but they are heading in the right direction through faith, and repentance is about heading in the right direction, not about perfection.
If we needed to have perfect obedience in order to become saved, then the forgiveness of our sins would have no value, but rather forgiveness is why we are not required to have perfect obedience. Repentance is more than just feeling bad about something, but about rectifying it and redirecting our lives towards heading in a different direction. If we needed to perfectly embody a character trait in order to have it, then no one would have any character traits, but rather someone having a character trait means that it characterizes what they believe about the way they should act. There is a spectrum between someone just feels bad about not doing something and them perfectly doing it throughout their entire life.You indicated before that forgiveness comes into play in these circumstances. But you also indicated that God does not require saved people to be perfect. You also argued that a character trait can be a flawed character trait and still be counted as good. And you have also argued that wanting to do good but not doing dood is not the character trait of saved people. But it seems like these four things are in conflict with each other because forgiveness is not necessary if a flawed character trait is counted as good or imperfect people can be counted as righteous and being a doer of the law (with the right intentions) does not align with not doing the law on occasion and feeling bad about it.