Soak, Forest's Curse, and Trick-or-Treat always fail when used on a Pokemon that is already terastalized.
A Pokemon under the effects of Forest's Curse/Trick-or-Treat always loses the effects upon terastalizing.
When a Pokemon hit by Soak terastalizes, it retains the STAB properties from the water type regardless. If a Pokemon hit by Soak terastalizes into the Stellar type, it will retain the water typing. These properties remain until the Pokemon is switched out.
(Note that for this I didn't test Trick-or-Treat but I'm assuming it works the same as Forest's Curse.)
Source: Testing in the game but I tested on Showdown and got the same results.