Last changed/Last updated

It’s not possible. Last updated and last changed are maintained by the state machine and not the entity.

Also, restarting Home Assistant is not a common thing so I wouldn’t worry about it