Dynamical phase transitions and temporal orthogonality in one-dimensional hard-core bosons: From the continuum to the lattice