Anisotropy of the anomalous Hall effect in the altermagnet candidate Mn$_5$Si$_3$ films