Very interesting observation. It reminds me of how Jesus renders Psalm 8:2 in the NT
“From the mouth of infants and nursing babes You have established STRENGTH Because of Your adversaries, To make the enemy and the revengeful cease.”
Psalms 8:2 NASB
And contrast that with the quote from Jesus
“and said to Him, "Do You hear what these children are saying?" And Jesus said to them, "Yes; have you never read, ' OUT OF THE MOUTH OF INFANTS AND NURSING BABIES YOU HAVE PREPARED PRAISE FOR YOURSELF '?"”
Matthew 21:16 NASB (sorry about all caps it was copy and paste)
If you put them together you get it in your passage
“"Behold, God is my salvation, I will trust and not be afraid; For the LORD GOD is my strength and song, And He has become my salvation."”
Isaiah 12:2 NASB
So I’m guessing that if you can choose between the true meaning of the word in context for זִמְרָת its song or praise.
It actually has to do with the idiom in the Hebrew “going in and going out”. It’s a warfare saying that first you went in before the Lord and were empowered and then you went out and did battle with your enemies. Moses, Joshua, David knew how it was done but Solomon says he didn’t know and needed wisdom to know how to go in and to go out before the people. To the Hebrew warfare was tied in to worship (and song).
“Give me now wisdom and knowledge, that I may go out and come in before this people, for who can rule this great people of Yours?"”
2 Chronicles 1:10 NASB
Jesus also makes reference to the phrase for the believers
“I am the door; if anyone enters through Me, he will be saved, and will go in and out and find pasture.”
John 10:9 NASB
So in a sense, song is a defense because it’s a strength and an act of spiritual warfare to shut the mouth of the enemy and silence the accuser; and that’s done through song. Your best defense against someone accusing you is to sing and not give them a chance to start!