So if I understand correctly, one option would be to write spaces just in case the data length shortens, and then I would not have to use the clear function at all?
Yes. Several ways to do this were covered recently, here: A very persistant zero on my LCD display - #2 by floresta - Displays - Arduino Forum
Don