Of course, as we all know, the perfect Law of Liberty does not free us "to do", but frees us from "having to do". We have our own free will, "to do" as we will, but much of the time it will get us into trouble. And particularly with the Lord.
Christians can and still do sin, nonetheless, and . . . God forbids it. Therefore, it gets a Christian in trouble with the Lord. Since God has given us knowledge aplenty to know what sin is and how and why to avoid it. And the power - His power - to pull that off. And so we don't consciously persist in what we know to be sin.
We also know that anywhere the Spirit of the Lord is, there is liberty. Those in whom the Spirit of the Lord does not abide are the only ones who will practice sin, because, the Lord told us so in 1 John 3:9. "No one who is born of God practices sin, because the seed of God abides in him". Where the seed of God is there is no sin. Where the Lord is, there is no sin. Where the Spirit of the Lord is, there is no sin. And apart from the Spirit of the Lord, there 'is' sin, and there is also then no liberty. No liberty in sin. The person who willfully goes on sinning will separate himself from the Lord. And, apart from the Lord he can expect no liberty.
I think the following statement gives us insight as well.
"Behold then the kindness and severity of God ; to those who fell, severity, but to you, God's kindness, if you continue in His kindness ; otherwise you also will be cut off."
God's kindness is almost incomprehensible. He simply wants us to look and see that Jesus' visit to this earth was His clear and sensible way of paving the way for us back to Himself. To be His grateful sons, in His gracious kingdom. He simply wants us to desire it, Him and His kingdom. Not desire it merely in order to save our own lives (He does know our motives), because he that would seek to save his life will lose it, but, to desire it after beholding Him, and His unique love for us whom He has created. Created by Him to have a love for Him such as He has for us. He has shown us that He is a loving Creator, and one who, very understandably, does not appreciate 'not' having His great love for us reciprocated.
His liberty is conditioned upon our love for Him. For upon seeing His love and what He has done for us we are helpless to do anything other than to love Him back. Outside of that love, and the love for that Spirit of His, and the loathing of those things which He finds loathesome (that is, not lovable but despicable), namely, willful sin, there is no liberty.
Don't do it. Don't try to use the gracious law of liberty as an excuse to sin so that God's grace may abound. Because it says, "God forbid". It says if the seed of the Lord abides in you then you will not tolerate nor want to indulge in anything that resembles sin. Things profane, angry, impatient, arrogant, lawless, selfish, and so on.
Just be assured that, if you love the Spirit of the Lord, and if He knows it (and He knows your heart better than you do), then there is nothing more that you "have to do" than to go forward and enjoy His liberty and the freedom in that liberty. It's freedom(release) from the power of sin. It's the aquired power over sinning itself. And it's in the Spirit of the Lord.