There is a way to do this by renaming your new entity id with the name of the old one.
You first need to delete the old entity.
See this post: How to keep old energy statistics history when changing the main meter sensor? - #7 by asrhael
But I agree there should be a way to easily change an entity by another and keep all historical data