Not necessary true. Mode collapse has a far more dynamic behavior. I explain it in an oversimplified version. Mode collapses but it can change from one mode to another. So it is not exactly stuck in local minima.
As shown in the coding example, there are cost functions that oscillate. Researchers have developed methods to dampen those oscillations. So this is the issue related to the defined cost function.