Constraining the $\bar{K}N$ interaction from the $1S$ level shift of kaonic deuterium