Dark-matter-deficient galaxies in hydrodynamical simulations