A study of the phase transition in 4D pure compact U(1) LGT on toroidal and spherical lattices