Mechanical engineering, fluid mechanics, electronics, all have a common core of mathematical modeling techniques. An engineering degree is fairly flexible, and one can even pivot into CS. But CS has no commonality with engineering, and a CS degree cannot pivot into engineering.