If I do sajda e sahw , for precaution, to correct the error of makhraj,

But after the salam of my namaz, I forgot and I started to do an other ibadat, like tasbi or an other namaz. And after that, I did my sajda.
My sajda still valid? Because I didnt perform it directly after my namaz

I mean, If we do another action before the sajda e sahw , the sajda still valid?
Or its obligatory to do it directly after the end of the namaz?

Ruling 1232. If a person intentionally does not perform sajdatā al‑sahw after the salām of the prayer he commits a sin; and based on obligatory precaution, he must perform it as soon as possible. And in the event that he inadvertently does not perform it, he must perform it as soon as he remembers and it is not necessary for him to perform the prayer again.