Hello Thaiming,
Change the entity_id on the one with the history to something else and give your new template entity that exact same entity_id. Makes sure the units and state class of the template entity are also the same as the old one.
The new one should have the old ones data history and keep going.
More details if you put this into a search engine,
site:home-assistant.io connect to history of old entity