sef explantatory
If a grounded Poison-type Pokémon is switched in, it will absorb Toxic Spikes and the effect of Toxic Spikes will end.
As Poison-type Pokémon have to be switched in for Toxic Spikes to be removed, the Toxic Spikes will remain even after your Pokémon terastalizes into Poison.
Source Showdown Testing to Confirm