In verse below, isn’t it pointing to someone being cast off forever by God?
“And thou, Solomon my son, know thou the God of thy father, and serve him with a perfect heart and with a willing mind: for the LORD searcheth all hearts, and understandeth all the imaginations of the thoughts: if thou seek him, he will be found of thee; but if thou forsake him, he will cast thee off for ever.” (1 Chronicles 28:9)
The word means “permanently” usually referring to permanently within a covenant or an age.
However, if some insist that it means forever, even then it can be explained as follows, please consider:
This exact same word exists in verse below too:
“Who is a God like You, who pardons iniquity And passes over the rebellious act of the remnant of His possession? He does not retain His anger forever, Because He delights in unchanging love.” (Micah 7:18)
We can clearly see that in the verse you quoted, God can choose to ‘cast off forever’ as King David (not God speaking) in that verse warns.
However, in Micah 7:18 above, we see a factual general statement regarding God by the prophet Micah where God has decided “not” to remain angry during that “forever” (or permanently) due to His Unchanging Love which is ‘greater’.
There’s still another explanation namely that a “Judgment sentence can be forever”. However as James 2:13 allows, His Mercy can triumph over it and end/pardon/cancel that Judgment sentence too agreeing to Micah 7:18 and the verse you quoted perfectly agreeing to Universal Reconciliation as other verses Beautifully testify too beyond Judgment.
“For judgment without mercy will be to the one not having shown mercy. Mercy triumphs over judgment.” (James 2:13)
Solomon is God’s Beloved despite his sins and God’s Love never fails (1 Corinthians 13:8 & Micah 7:18 too):
“Did not Solomon king of Israel sin by these things? yet among many nations was there no king like him, who was beloved of his God, and God made him king over all Israel: nevertheless even him did outlandish women cause to sin.” (Nehemiah 13:26)
Oh ya, ‘All Israel will be saved too’ eventually (which includes Solomon too) as it is written:
“And so all Israel will be saved, as it has been written: “The One Delivering will come out of Zion, He will remove ungodliness from Jacob.” (Romans 11:26)