Why is there an error in reproducing this alternate optimization implemented using the SCA algorithm and penalty function?

Getting SCA to run nicely is out of scope of this forum. SCA is unreliable, and many of the algorithms are too complicated for volunteers with limited time to be able to spend adequate effort to figure out things.