Why does iterative optimisation result in a value of 0

You are not trying to solve a convex optimization problem with CVX. You are trying to solve a non-convex optimization problem by calling CVX within some type oif SCA or alternating variables algorithm. Note that if you use a different initial value of p0, you might get different results, maybe better, maybe not.