How to wavey rectangle edges straight, sine wave

You might want to dial back the graph mapper a little, like this:

It can be handy to limit the range of the damping effect, as in three of the links I posted.

Here is one more example: