The integral Hodge conjecture for two-dimensional Calabi–Yau categories