We study (anti)deuteron formation rates in heavy-ion collisions in the framework of a wave-function based coalescence model. The main feature of our model is that nucleons are emitted from the whole spherically symmetric fireball volume, while antinucleons are emitted only from a spherical shell close to the surface. In this way, the model accounts for nucleon-antinucleon annihilations in the center of the reaction at lower beam energies. Comparison with experimental data on the coalescence parameter in the range allows us to extract radii of the respective source geometries. Our results are qualitatively supported by data from the UrQMD transport model which shows a comparable trend in the geometric radii as a function of beam energy. In line with our expectations, we find that at lower energies, the central region of the fireball experiences stronger annihilation than at higher energies.