Phase-induced topological superconductivity in a planar heterostructure