Intracluster stars in simulations with active galactic nucleus feedback