Search for long-lived charginos based on a disappearing-track signature in $pp$ collisions at $\sqrt{s} = 13$ TeV with the ATLAS detector