Antiferromagnetic order in Co-doped Fe$_5$GeTe$_2$ probed by resonant magnetic x-ray scattering