Mushy stems and canes on a Dracaena marginata are caused by over-watering which results in root-rot. Root-rot is the number one reason these plants die. Stop watering until the soil is almost dry. Remove all soft and mushy parts of the stems, and move your plant into bright indirect light.