No matter how hard you try, you will not be liked by everybody. You will have enemies. As long as you stand for something, you will be opposed by people who have a conflict of interest. There is no servant of God in the bible that did not have any opposition or enemy. Jesus had to deal with political and religious oppositions to his radical ideas. He promised his followers that they would also face similar persecution. You have to make peace with the idea that no matter how perfect you are. Some people will never like you. They will never cooperate with you.
Moses did not only deal with Pharaoh and Egyptian opposition. He also had to deal with dissent within the camp of the children of Israel. Despite being a top-performer for the King, Daniel was still attacked for his faith. The Apostles faced persecutions for their unwavering faith in God. When you make peace with the idea that everybody will not like you. It makes it easier for you to focus on what matters. The most important thing is to gain clarity around what God wants from you and stick to it. People who share your values will befriend you and support you. You have no business with those who don’t share your values.
It is part of the human condition to get into disagreements with people. In fact, if you are always in agreement with people, something is wrong. It usually means that someone in that relationship is holding back from telling the truth. As Jesus continued to minister the word of life and truth, many stopped following him (John 6:66-69). There is no relationship worth having, that would require compromising the truth. You can never get everybody to like you, no matter how nice or well behaved you might be. Therefore submit yourself to the leading of the Holy Spirit. Do your work. It will attract like minded people to you. It will also turn away a lot of people from you. Be prepared.