In Matthew 4:15-23, Jesus began his ministry with the Gospel message to repent for the Kingdom of God is at hand, which was a light to the Gentiles, and the Mosaic Law was how his audience knew what sin is (Romans 3:20), so repenting from our disobedience to it is a central part of the Gospel message, which is summed up by the greatest two commandments.
We can't earn our righteousness as a wage by obeying the Mosaic Law even through having perfect obedience to it (Romans 4:1-5), so the reason why we can't earn our justification or salvation by obeying it is not because we can't obey it perfectly, but because it was never given as a way of doing that in the first place. However, the fact that we do not earn our salvation as a wage by obeying God does not mean that we are not obligated to obey what He has instructed. Obedience to any set of instructions is about relying on the one who gave them to us to guide us in how to rightly live, so they are not something that we do on our own, and it is absurd to think that God is offended by us relying on what He has instructed, especially when all throughout the Bible God called for His people to repent from our disobedience to what He has instructed.
Christ expressed his righteousness through living in obedience to the Mosaic Law, so that is also the way that we get to live when his righteousness is imputed to us. In Psalms 119:29-30, he wanted put false ways far from him, for God to be gracious to him by teaching him to obey the Mosaic Law, and he chose the way of faithfulness by setting it before him, so this has always been the one and only way of salvation by grace alone through faith alone in Christ alone. Never try to separate Law and Gospel because it is no Gospel without Law.