You have a special non-printable carriage return character at the end...

try:
=RIGHT(CLEAN(A1),5)