Will you please explain why you think that these verses don't describe God's ways as what He commanded to Moses?:
Joshua 22:5 Only be very careful to observe the commandment and the law that Moses the servant of the Lord commanded you, to love the Lord your God, and to walk in all his ways and to keep his commandments and to cling to him and to serve him with all your heart and with all your soul.”
1 Kings 2:1-3 When David's time to die drew near, he commanded Solomon his son, saying, 2 “I am about to go the way of all the earth. Be strong, and show yourself a man, 3 and keep the charge of the Lord your God, walking in his ways and keeping his statutes, his commandments, his rules, and his testimonies, as it is written in the Law of Moses, that you may prosper in all that you do and wherever you turn,
Psalms 103:1-8 Bless the Lord, O my soul, and all that is within me, bless his holy name! 2 Bless the Lord, O my soul, and forget not all his benefits, 3 who forgives all your iniquity, who heals all your diseases, 4 who redeems your life from the pit, who crowns you with steadfast love and mercy, 5 who satisfies you with good so that your youth is renewed like the eagle's. 6 The Lord works righteousness and justice for all who are oppressed. 7 He made known his ways to Moses, his acts to the people of Israel. 8 The Lord is merciful and gracious, slow to anger and abounding in steadfast love.
God's Law reveals His righteous standard and God would have had no just grounds by which to judge Sodom and Gomorrah if they were not under His Law and obligated to live according to His righteous standard. We are told in 1 John 3:4-10 that sin is defined as the transgression of the Law, that we are not to continue to practice sin, and that anyone who does not practice righteousness is not a child of God, so this is not optional for children of God.
Do you believe that the Father is in disagreement with the Holy Spirit about what conduct we should have? Was the Father acting against the Holy Spirit and commanding the Israelites to act against the Spirit when He gave the Law to Moses? Rather, everything listed in Galatians 5:19-23 as works of the flesh that are against the Spirit are also against against the Law, while everything listed as fruits of the Spirit are in accordance with the Law, and in fact the Spirit has the role of leading us to obey the Law (Ezekiel 36:26-27).
In Romans 7:21-25, Paul said that he delighted in obeying God's Law and that he served with with His mind, but contrasted that with the law of sin, which held him captive and that he served with his flesh, and in Romans 8:2, the Spirit sets us free from the law of sin and death, not from God's Law. In Romans 8:4-7, it says that it is the mind that is set on the flesh that refuses to submit to God's Law in contrast with walking in the Spirit.