Turing Machine that always returns a blank tape Is it possible to construct a Turing Machine such that given any finite input on a tape $s$, it clears the tape in a finite amount of time?

I have used such a TM as an intermediate step to show a reduction from the State Entry Problem to is $w \in L(M)$ problem but I don't know if it is feasible to construct one.

Even if we assume that the head of the TM always starts at the leftmost character on the tape and keep moving write, clearing each symbol we encounter, if the tape is infinite, how will we know when to stop moving right?
While the tape is infinite, the amount of characters written on it is finite at any given point in time.

As sasha indicates in their comment, we usually assume that the tape is initialized with a special blank character. Given a Turing machine, you can modify it so that whenever it visit a cell having the special blank character, it replaces it with some other blank character, which it treats the same as the special blank character. Now at any given point in time you can find the (finite) extent of tape which has been visited, and clear it if you wish.