The easiest way to “fix” the transfer portal is to sign new recruits to four-year contracts. Any freshman who isn’t willing to sign doesn’t get recruited. And if you sign a player from another program through the transfer portal, then you set the term of the contract equal to that player’s remaining years of NCAA sports eligibility.
I hear you, but at present, there is no “penalty” for breaking your commitment. A four year contract with no penalty for breaking it is worthless.