Phase diagram of the dissipative quantum Ising model on a square lattice