Universal phase diagram of topological superconductors subjected to magnetic flux