Global dynamics of a degenerate planar piecewise linear differential system with three zones