Yes, they retain their Tera type.
To test, I transferred my Tera Dark Mew (as well as other Pokemon with unique Tera typings) from Violet to Shield. They obviously didn't have the Tera typing even when sending them out in battle. I put the Pokemon in the Home Box, and then prepared to move from Home to Violet. In the Home box, the tera types didn't show, but when I moved the Pokemon from the Home box to the Violet box, the Tera types showed in the summary again. In Violet, I terastalized, and the Tera typings were still the same.
Hope this helped!