Tuning Ising superconductivity with layer and spin–orbit coupling in two-dimensional transition-metal dichalcogenides