What is the make/model of your ssd?
Where is it mounted?
Continuous writing puts a heavy load on a ssd.
Once the input buffers are filled, the data needs to be written to the underlying nand blocks.
If the ssd is small, or near full, this can take a long time.
Cheaper qlc based devices will not be as capable as mlc devices.
When a ssd is hammered with sequential activity, it can heat up and throttle.
That is usually while reading.
If you think heat is the issue, see that the ssd gets cooling airflow.
Possibly an aux heat sink can help.