We conducted a comprehensive investigation of dislocations in Al0.46Ga0.54N. Using aberration-corrected scanning transmission electron microscopy and energy dispersive X-ray spectroscopy, the atomic structure and atom distribution at the dislocation core have been examined. We report that the core configuration of dislocations in AlGaN is consistent with that of other materials in the III-Nitride system. However, we observed that the dissociation of mixed-type dislocations is impeded by alloying GaN with AlN, which is confirmed by our experimental observation of Ga and Al atom segregation in the tensile and compressive parts of the dislocations, respectively. Investigation of the optical properties of the dislocations shows that the atom segregation at dislocations has no significant effect on the intensity recorded by cathodoluminescence in the vicinity of the dislocations. These results are in contrast with the case of dislocations in In0.09Ga0.91N where segregation of In and Ga atoms also occurs but results in carrier localization limiting non-radiative recombination at the dislocation. This study therefore sheds light on why InGaN-based devices are generally more resilient to dislocations than their AlGaN-based counterparts.